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.
2 parents 3c2c4dc + c870983 commit d7a9da2Copy full SHA for d7a9da2
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