mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-22 13:21:51 +00:00
removing useless catch that causes troubles when FF throws exceptions within the loop but outside of the try/catch clause
This commit is contained in:
parent
7159b30752
commit
9899959d69
1 changed files with 9 additions and 12 deletions
21
src/JSON.js
21
src/JSON.js
|
|
@ -81,19 +81,16 @@ function toJsonArray(buf, obj, pretty, stack){
|
||||||
keys.sort();
|
keys.sort();
|
||||||
for ( var keyIndex = 0; keyIndex < keys.length; keyIndex++) {
|
for ( var keyIndex = 0; keyIndex < keys.length; keyIndex++) {
|
||||||
var key = keys[keyIndex];
|
var key = keys[keyIndex];
|
||||||
try {
|
var value = obj[key];
|
||||||
var value = obj[key];
|
if (typeof value != 'function') {
|
||||||
if (typeof value != 'function') {
|
if (comma) {
|
||||||
if (comma) {
|
buf.push(",");
|
||||||
buf.push(",");
|
if (pretty) buf.push(pretty);
|
||||||
if (pretty) buf.push(pretty);
|
|
||||||
}
|
|
||||||
buf.push(angular['String']['quote'](key));
|
|
||||||
buf.push(":");
|
|
||||||
toJsonArray(buf, value, childPretty, stack);
|
|
||||||
comma = true;
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
buf.push(angular['String']['quote'](key));
|
||||||
|
buf.push(":");
|
||||||
|
toJsonArray(buf, value, childPretty, stack);
|
||||||
|
comma = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buf.push("}");
|
buf.push("}");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue