mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
js: dont use async js_main in '-es5' mode (#12870)
This commit is contained in:
parent
4ecdb28f5a
commit
08766da7e8
@ -629,7 +629,7 @@ fn (mut g JsGen) gen_method_decl(it ast.FnDecl, typ FnGenType) {
|
||||
if is_main {
|
||||
// there is no concept of main in JS but we do have iife
|
||||
g.writeln('/* program entry point */')
|
||||
if g.pref.output_es5 {
|
||||
if !g.pref.output_es5 {
|
||||
// main function is always async
|
||||
g.write('async ')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user