Browse Source

repl: use Object.getPrototypeOf on functions for tab complete()

v0.9.1-release
Nathan Rajlich 13 years ago
parent
commit
e16021340d
  1. 2
      lib/repl.js

2
lib/repl.js

@ -589,7 +589,7 @@ REPLServer.prototype.complete = function(line, callback) {
try {
var sentinel = 5;
var p;
if (typeof obj == 'object') {
if (typeof obj === 'object' || typeof obj === 'function') {
p = Object.getPrototypeOf(obj);
} else {
p = obj.constructor ? obj.constructor.prototype : null;

Loading…
Cancel
Save