diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-04-21 13:53:49 -0700 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2012-04-21 13:53:49 -0700 |
commit | e16021340dd38895b8c7f310355e3a79881f45ed (patch) | |
tree | ee3c90c7aa849dc5824f8ba4a0b7e80ebca14e6f /lib/repl.js | |
parent | c0a9985da7a7d3f6ebc51805d6955d92b1bd6e78 (diff) | |
download | node-new-e16021340dd38895b8c7f310355e3a79881f45ed.tar.gz |
repl: use Object.getPrototypeOf on functions for tab complete()
Diffstat (limited to 'lib/repl.js')
-rw-r--r-- | lib/repl.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/repl.js b/lib/repl.js index 0a81ebc7df..9cd88afb84 100644 --- a/lib/repl.js +++ b/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; |