Permalink
Browse files

Fixing bug related to rails PUT requests returning an empty string back

  • Loading branch information...
dhm116 committed Jan 3, 2012
1 parent 8dc95ea commit 586b9f4fdc585a504f3b04fde8d08e37680cc726
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/restler.js
View
@@ -213,7 +213,7 @@ var parsers = {
callback(data);
},
json: function(data, callback) {
- callback(data && JSON.parse(data));
+ callback(data && data.length > 1 && JSON.parse(data));
}
}

0 comments on commit 586b9f4

Please sign in to comment.