Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Use Object.getPrototypeOf() on the object in the REPL tab-completion.

Some people use __proto__ to augment an Object's prototype after it's been created.
This patch helps make the "new" prototype properties visible if necessary.

This is also more consistent with the while logic below.
  • Loading branch information...
TooTallNate authored and ry committed Aug 23, 2011
1 parent b15ab5d commit 8ec31a3362d016d6209694fb70639bf3d963e48b
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/repl.js
@@ -412,8 +412,8 @@ REPLServer.prototype.complete = function(line) {
// works for non-objects
var p = obj.constructor ? obj.constructor.prototype : null;
try {
var p = Object.getPrototypeOf(obj);
var sentinel = 5;
while (p !== null) {

0 comments on commit 8ec31a3

Please sign in to comment.
You can’t perform that action at this time.