From 5f33521be529cc7046d517e54fa93a5a220c40c7 Mon Sep 17 00:00:00 2001 From: Yazhong Liu Date: Mon, 18 May 2015 01:25:19 +0800 Subject: [PATCH] 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 --- lib/repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repl.js b/lib/repl.js index 7d2a77a6ce2143..40496559bf452f 100644 --- a/lib/repl.js +++ b/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