aboutsummaryrefslogtreecommitdiffstats
path: root/src/JSON.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/JSON.js')
-rw-r--r--src/JSON.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/JSON.js b/src/JSON.js
index 340b075a..0d2fbca4 100644
--- a/src/JSON.js
+++ b/src/JSON.js
@@ -74,7 +74,7 @@ function toJsonArray(buf, obj, pretty, stack){
var childPretty = pretty ? pretty + " " : false;
var keys = [];
for(var k in obj) {
- if (k.indexOf('$$') === 0 || obj[k] === undefined)
+ if (!obj.hasOwnProperty(k) || k.indexOf('$$') === 0 || obj[k] === undefined)
continue;
keys.push(k);
}