Skip to main content

Bug Tracker

Side navigation

#13630 closed bug (duplicate)

Opened March 19, 2013 11:38PM UTC

Closed March 19, 2013 11:50PM UTC

parseJSON function error

Reported by: krishie@gmail.com 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.

Attachments (0)
Change History (1)

Changed March 19, 2013 11:50PM UTC by rwaldron comment:1

resolution: → duplicate
status: newclosed

Duplicate of #13430.