diff options
author | max99x <max99x@gmail.com> | 2011-08-27 05:31:53 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-08-27 05:31:53 +0300 |
commit | 40903be0adbf69ce43c0461bc33883cb401a7fe3 (patch) | |
tree | bc54335f197676fc8b25a7f63bffa14e1f33ad1f | |
parent | 46222e286058a6d425c0563522d54ee5299a7cd0 (diff) |
Fixed stdin failure in strict mode.
-rw-r--r-- | src/library.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index ba82461b..b83a79e1 100644 --- a/src/library.js +++ b/src/library.js @@ -308,7 +308,8 @@ LibraryManager.library = { if (!input) input = function() { if (!input.cache || !input.cache.length) { var result; - if (window && typeof window.prompt == 'function') { + if (typeof window != 'undefined' && + typeof window.prompt == 'function') { // Browser. result = window.prompt('Input: '); } else if (typeof readline == 'function') { |