Skip to content

Commit

Permalink
repl: remove unnecessary check for globals
Browse files Browse the repository at this point in the history
There is no need to check for globals and also check if it is
an array.

PR-URL: #1722
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
yorkie authored and cjihrig committed May 17, 2015
1 parent fbaef40 commit 5f33521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f33521

Please sign in to comment.