projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69c35f9
)
[repl] add error handling for async scope fetching
author
Fedor Indutny
<fedor.indutny@gmail.com>
Sun, 11 Sep 2011 14:52:24 +0000
(21:52 +0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Wed, 14 Sep 2011 03:40:21 +0000
(20:40 -0700)
lib/repl.js
patch
|
blob
|
history
diff --git
a/lib/repl.js
b/lib/repl.js
index
cc9b227
..
27eeaf5
100644
(file)
--- a/
lib/repl.js
+++ b/
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);