We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c2c4dc commit c870983Copy full SHA for c870983
compiler/natives/src/os/os.go
@@ -18,7 +18,7 @@ func runtime_args() []string { // not called on Windows
18
19
func init() {
20
if process := js.Global.Get("process"); process != js.Undefined {
21
- if argv := process.Get("argv"); argv != js.Undefined {
+ if argv := process.Get("argv"); argv != js.Undefined && argv.Length() >= 1 {
22
Args = make([]string, argv.Length()-1)
23
for i := 0; i < argv.Length()-1; i++ {
24
Args[i] = argv.Index(i + 1).String()
0 commit comments