Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[repl] add error handling for async scope fetching
  • Loading branch information
indutny authored and ry committed Sep 14, 2011
1 parent 69c35f9 commit 57388d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/repl.js
Expand Up @@ -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);
Expand Down

0 comments on commit 57388d8

Please sign in to comment.