Skip to content

Commit add7e11

Browse files
committed
[js] Tweak to nqp.dumpObj.
1 parent 7c502f6 commit add7e11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vm/js/nqp-runtime/runtime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ exports.dumpObj = function(obj) {
400400
return JSON.stringify(obj, function(key, value) {
401401
if (key == '_SC') return undefined;
402402
for (var i = 0; i < seen.length; i++) {
403-
if (seen[i] === value) return 'circular';
403+
if (typeof value !== 'string' && typeof value !== 'number' && seen[i] === value) return 'circular';
404404
}
405405
seen.push(value);
406406
return value;

0 commit comments

Comments
 (0)