Don't show "[object Object]" in varDump() output
This commit is contained in:
parent
3b0b2c59b7
commit
e0ea3ca99b
1 changed files with 9 additions and 1 deletions
|
@ -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) + ": ";
|
||||
|
||||
|
|
Loading…
Reference in a new issue