Skip to content

Commit

Permalink
Check for the existence of data first in 'Backbone.Collection.prototy…
Browse files Browse the repository at this point in the history
…pe.parse'
  • Loading branch information
PaulUithol committed Aug 23, 2011
1 parent d76b3e5 commit c26531c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone-tastypie.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
};

Backbone.Collection.prototype.parse = function( data ) {
return data.objects;
return data && data.objects;
};

Backbone.Collection.prototype.url = function( models ) {
Expand Down

0 comments on commit c26531c

Please sign in to comment.