www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e0ea3ca99bed1d81c545ad571ecaa840a64e7ef3
parent 3b0b2c59b7c7f52277e2b472042026512b7e4fe2
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 19 May 2015 01:13:35 -0400

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

Diffstat:
Mchrome/content/zotero/xpcom/utilities.js | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -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) + ": ";