in JSON.parse, throw original error

This commit is contained in:
rolux 2012-05-26 15:09:57 +02:00
parent f37c60b31a
commit 6169a4e6ec

View file

@ -162,11 +162,7 @@ Ox.fallback.JSON = (function() {
};
return {
parse: function parse(string) {
try {
return eval('(' + string + ')');
} catch (e) {
throw new SyntaxError();
}
return eval('(' + string + ')');
},
stringify: function stringify(value) {
var ret = 'null', type = Ox.typeOf(value);