Tweak varDump to not use object property getter unnecessarily

This commit is contained in:
Aurimas Vinckevicius 2015-09-16 17:50:19 -05:00
parent 0320b08b05
commit 74863843f4

View file

@ -1346,7 +1346,7 @@ Zotero.Utilities = {
//Special handling for Error or Exception
var isException = Zotero.isFx && !Zotero.isBookmarklet && obj instanceof Components.interfaces.nsIException;
var isError = obj instanceof Error;
if (!isException && !isError && obj.constructor && obj.stack) {
if (!isException && !isError && constructor in obj && stack in obj) {
switch (obj.constructor.name) {
case 'Error':
case 'EvalError':