mirror of https://github.com/nodejs/node.git
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>pull/1708/merge
parent
fbaef40e63
commit
5f33521be5
|
@ -624,7 +624,7 @@ REPLServer.prototype.complete = function(line, callback) {
|
||||||
completionGroupsLoaded();
|
completionGroupsLoaded();
|
||||||
} else {
|
} else {
|
||||||
this.eval('.scope', this.context, 'repl', function(err, globals) {
|
this.eval('.scope', this.context, 'repl', function(err, globals) {
|
||||||
if (err || !globals || !Array.isArray(globals)) {
|
if (err || !Array.isArray(globals)) {
|
||||||
addStandardGlobals(completionGroups, filter);
|
addStandardGlobals(completionGroups, filter);
|
||||||
} else if (Array.isArray(globals[0])) {
|
} else if (Array.isArray(globals[0])) {
|
||||||
// Add grouped globals
|
// Add grouped globals
|
||||||
|
|
Loading…
Reference in New Issue