Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix REPL crash on tabbing 'this.'

Thanks to Tim Becker for pointing this out.
  • Loading branch information...
commit 2fb393a768de8998f1b710e010705bb76b80ddc1 1 parent 80974dc
@ry ry authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/repl.js
View
3  lib/repl.js
@@ -318,7 +318,8 @@ REPLServer.prototype.complete = function (line) {
if (typeof obj === "object" || typeof obj === "function") {
memberGroups.push(Object.getOwnPropertyNames(obj));
}
- var p = obj.constructor.prototype; // works for non-objects
+ // works for non-objects
+ var p = obj.constructor ? obj.constructor.prototype : null;
try {
var sentinel = 5;
while (p !== null) {
Please sign in to comment.
Something went wrong with that request. Please try again.