Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
repl: use Object.getPrototypeOf on functions for tab complete()
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Apr 21, 2012
1 parent c0a9985 commit e160213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/repl.js
Expand Up @@ -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;
Expand Down

0 comments on commit e160213

Please sign in to comment.