mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-19 08:00:23 +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();
|
||||
for ( var keyIndex = 0; keyIndex < keys.length; keyIndex++) {
|
||||
var key = keys[keyIndex];
|
||||
try {
|
||||
var value = obj[key];
|
||||
if (typeof value != 'function') {
|
||||
if (comma) {
|
||||
buf.push(",");
|
||||
if (pretty) buf.push(pretty);
|
||||
}
|
||||
buf.push(angular['String']['quote'](key));
|
||||
buf.push(":");
|
||||
toJsonArray(buf, value, childPretty, stack);
|
||||
comma = true;
|
||||
var value = obj[key];
|
||||
if (typeof value != 'function') {
|
||||
if (comma) {
|
||||
buf.push(",");
|
||||
if (pretty) buf.push(pretty);
|
||||
}
|
||||
} catch (e) {
|
||||
buf.push(angular['String']['quote'](key));
|
||||
buf.push(":");
|
||||
toJsonArray(buf, value, childPretty, stack);
|
||||
comma = true;
|
||||
}
|
||||
}
|
||||
buf.push("}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue