Don't show "[object Object]" in varDump() output

This commit is contained in:
Dan Stillman 2015-05-19 01:13:35 -04:00
parent 3b0b2c59b7
commit e0ea3ca99b

View file

@ -1381,7 +1381,15 @@ Zotero.Utilities = {
}
var isArray = objType == '[object Array]'
var dumpedText = isArray ? '[' : objType + ' {';
if (isArray) {
var dumpedText = '[';
}
else if (objType == '[object Object]') {
var dumpedText = '{';
}
else {
var dumpedText = objType + ' {';
}
for (var prop in obj) {
dumpedText += '\n' + level_padding + JSON.stringify(prop) + ": ";