Skip to content

Commit 1e39098

Browse files
committed
Update playground.go to be compatible with GopherJS 1.17.
1 parent 35cbc37 commit 1e39098

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

playground/playground.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"go/scanner"
99
"go/token"
1010
"go/types"
11+
"runtime"
1112
"strings"
1213
"time"
1314

@@ -194,7 +195,7 @@ func main() {
194195

195196
jsCode := bytes.NewBuffer(nil)
196197
jsCode.WriteString("try{\n")
197-
compiler.WriteProgramCode(allPkgs, &compiler.SourceMapFilter{Writer: jsCode})
198+
compiler.WriteProgramCode(allPkgs, &compiler.SourceMapFilter{Writer: jsCode}, runtime.Version())
198199
jsCode.WriteString("} catch (err) {\ngoPanicHandler(err.message);\n}\n")
199200
js.Global.Set("$checkForDeadlock", true)
200201
js.Global.Call("eval", js.InternalObject(jsCode.String()))

0 commit comments

Comments
 (0)