Bug Tracker

Opened 9 years ago

Closed 9 years ago

#13630 closed bug (duplicate)

parseJSON function error

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

As the world knows, your work is simply awesome. Much appriciated & thanks a lot for keeping this up.

Today, when I updated my jQuery plug-in to 1.9.1, I ran through an issue, which I thought of bringing to your notice. I got error in following function which is at Line 538.

parseJSON: function( data )

Somehow, the caller is sending data as 'undefined' object because of which the following line is throwing error

return window.JSON.parse( data )

I've no control over the caller as unobtrusive validation used in MVC3 invokes this function. To resolve that, I moved the validation which was just below to the first of this function. Also modified it as below.

  if (data === null || data == null) {
	        return data;
	    }

Hope it makes sense. I'm not sure that this could potentially cause some other error. Please let me know.

Change History (1)

comment:1 Changed 9 years ago by Rick Waldron

Resolution: duplicate
Status: newclosed

Duplicate of #13430.

Note: See TracTickets for help on using tickets.