Skip to content
Browse files

Move the sentinel variable to the top.

Keep the vars together.
  • Loading branch information...
1 parent c7e1018 commit f8c73108d11a4fe567056fb7fc9303255f6df2a6 @TooTallNate committed Feb 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/repl.js
View
2 lib/repl.js
@@ -523,13 +523,13 @@ REPLServer.prototype.complete = function(line, callback) {
}
// works for non-objects
try {
+ var sentinel = 5;
var p;
if (typeof obj == 'object') {
p = Object.getPrototypeOf(obj);
} else {
p = obj.constructor ? obj.constructor.prototype : null;
}
- var sentinel = 5;
while (p !== null) {
memberGroups.push(Object.getOwnPropertyNames(p));
p = Object.getPrototypeOf(p);

0 comments on commit f8c7310

Please sign in to comment.
Something went wrong with that request. Please try again.