diff --git a/lib/_debugger.js b/lib/_debugger.js index 859dc2c1af0..adde5004807 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -291,7 +291,10 @@ Client.prototype.reqEval = function(expression, cb) { var frame = bt.frames[self.currentFrame]; var evalFrames = frame.scopes.map(function(s) { - return bt.frames[s.index].index; + if (!s) return; + var x = bt.frames[s.index]; + if (!x) return; + return x.index; }); self._reqFramesEval(expression, evalFrames, cb);