mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
[repl] add error handling for async scope fetching
This commit is contained in:
@@ -405,7 +405,9 @@ REPLServer.prototype.complete = function(line, callback) {
|
||||
completionGroupsLoaded();
|
||||
} else {
|
||||
this.eval('.scope', this.context, 'repl', function(err, globals) {
|
||||
if (Array.isArray(globals[0])) {
|
||||
if (err || !globals) {
|
||||
addStandardGlobals();
|
||||
} else if (Array.isArray(globals[0])) {
|
||||
// Add grouped globals
|
||||
globals.forEach(function(group) {
|
||||
completionGroups.push(group);
|
||||
|
||||
Reference in New Issue
Block a user