Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #57 from dhm116/master

Empty server response causes "Unexpected end of input" exception
  • Loading branch information...
commit 39d1daecd029b6a34d79b8fb92dd6e3aa08cd512 2 parents fbc63c8 + 586b9f4
@ayoung ayoung authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/restler.js
View
2  lib/restler.js
@@ -235,7 +235,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 39d1dae

Please sign in to comment.
Something went wrong with that request. Please try again.