misc/wasm: set non-empty default for os.Args

os.Args is usually never empty and the flag package panics if it is.
This commit makes os.Args default to ["js"] for js/wasm.

Change-Id: Iba527145686487b052da438fca40159e57e61a81
Reviewed-on: https://go-review.googlesource.com/117475
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Richard Musiol 2018-06-08 18:28:37 +02:00 committed by Brad Fitzpatrick
parent afae876b31
commit 96faeb0bb0
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@
global.Go = class {
constructor() {
this.argv = [];
this.argv = ["js"];
this.env = {};
this.exit = (code) => {
if (code !== 0) {