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