in JSON.parse, throw original error
This commit is contained in:
parent
f37c60b31a
commit
6169a4e6ec
1 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue