mirror of https://github.com/nodejs/node.git
repl: use Object.getPrototypeOf on functions for tab complete()
parent
c0a9985da7
commit
e16021340d
|
@ -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…
Reference in New Issue