diff --git a/toolkit/devtools/webconsole/utils.js b/toolkit/devtools/webconsole/utils.js index c3e1f70ed6ef..3dd4eb6257fd 100644 --- a/toolkit/devtools/webconsole/utils.js +++ b/toolkit/devtools/webconsole/utils.js @@ -1177,10 +1177,10 @@ let DebuggerEnvironmentSupport = { // TODO: we should use getVariableDescriptor() here - bug 725815. let result = aObj.getVariable(aName); // FIXME: Need actual UI, bug 941287. - if (result.optimizedOut || result.missingArguments) { + if (result === undefined || result.optimizedOut || result.missingArguments) { return null; } - return result === undefined ? null : { value: result }; + return { value: result }; }, };