Browse Source

repl: remove unnecessary check for globals

There is no need to check for globals and also check if it is
an array.

PR-URL: https://github.com/nodejs/io.js/pull/1722
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v2.3.1-release
Yazhong Liu 10 years ago
committed by cjihrig
parent
commit
5f33521be5
  1. 2
      lib/repl.js

2
lib/repl.js

@ -624,7 +624,7 @@ REPLServer.prototype.complete = function(line, callback) {
completionGroupsLoaded();
} else {
this.eval('.scope', this.context, 'repl', function(err, globals) {
if (err || !globals || !Array.isArray(globals)) {
if (err || !Array.isArray(globals)) {
addStandardGlobals(completionGroups, filter);
} else if (Array.isArray(globals[0])) {
// Add grouped globals

Loading…
Cancel
Save