aboutsummaryrefslogtreecommitdiffstats
path: root/src/JSON.js
diff options
context:
space:
mode:
authoriminar2010-08-16 10:48:00 -0700
committeriminar2010-08-16 10:48:00 -0700
commit9899959d695a97ddbb3e9a626a769efa714bffe7 (patch)
treef4a73f98815c1ee88768b39c1ddf5327070be7b4 /src/JSON.js
parent7159b30752f63ad8a127101cbc10d7e672ae1620 (diff)
downloadangular.js-9899959d695a97ddbb3e9a626a769efa714bffe7.tar.bz2
removing useless catch that causes troubles when FF throws exceptions within the loop but outside of the try/catch clause
Diffstat (limited to 'src/JSON.js')
-rw-r--r--src/JSON.js21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/JSON.js b/src/JSON.js
index 0d2fbca4..ba3d700e 100644
--- a/src/JSON.js
+++ b/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("}");