From 808a8bc60d5cb62cd1cc9dd006be2f7dd2226acd Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Sat, 16 Oct 2021 19:23:27 +0800 Subject: [PATCH] update --- core/otto.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/otto.go b/core/otto.go index ca6af2f..8bffbac 100644 --- a/core/otto.go +++ b/core/otto.go @@ -157,9 +157,9 @@ func init123() { return v } vm := otto.New() - vm.Set("call", func(call otto.FunctionCall) otto.Value { - key := call.Argument(0).String() - value := call.Argument(1).String() + vm.Set("call", func(name otto.Value, arg otto.Value) interface{} { + key := name.String() + value := arg.String() if f, ok := OttoFuncs[key]; ok { v, _ := otto.ToValue(f(value)) return v