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:
iminar 2010-08-16 10:48:00 -07:00
parent 7159b30752
commit 9899959d69

View file

@ -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("}");