Merge 5eda1e36d7 into 9967722b18
This commit is contained in:
commit
69ed45df94
1 changed files with 2 additions and 2 deletions
|
|
@ -34,11 +34,11 @@ func (j *jsRunner) Engine() Engine {
|
|||
}
|
||||
|
||||
func (j *jsRunner) MustGet(key string) (JSValue, error) {
|
||||
result := j.global.Get("elkResult")
|
||||
result := j.global.Get(key)
|
||||
if result.IsUndefined() {
|
||||
return nil, fmt.Errorf("key %q not found in global scope", key)
|
||||
}
|
||||
defer j.global.Set("elkResult", js.Undefined())
|
||||
defer j.global.Set(key, js.Undefined())
|
||||
return &jsValue{val: result}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue