Browse Source

[repl] add error handling for async scope fetching

Fedor Indutny 13 years ago
committed by Ryan Dahl
parent
commit
57388d8b2e
  1. 4
      lib/repl.js

4
lib/repl.js

@ -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);

Loading…
Cancel
Save