diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-07-30 11:36:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-07-30 11:36:23 -0700 |
commit | e1f51c6d670ff74b16c3ceeef96af1bca5f02f0e (patch) | |
tree | d3258c314952a05d9893afdd1cacb395f54a1b10 /src/shell.js | |
parent | 3268d11056f2ee5544dbad295c6cbde245e1306c (diff) |
let Module specify arguments
Diffstat (limited to 'src/shell.js')
-rw-r--r-- | src/shell.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/shell.js b/src/shell.js index 06cf4175..222aba26 100644 --- a/src/shell.js +++ b/src/shell.js @@ -12,13 +12,15 @@ if (!this['Module']) { this['Module'] = {}; } -try { - Module.arguments = scriptArgs; -} catch(e) { +if (!Module.arguments) { try { - Module.arguments = arguments; + Module.arguments = scriptArgs; } catch(e) { - Module.arguments = []; + try { + Module.arguments = arguments; + } catch(e) { + Module.arguments = []; + } } } //*/ |