diff --git a/global.go b/global.go index 0c1782f..28f233f 100644 --- a/global.go +++ b/global.go @@ -722,6 +722,8 @@ func newContext() *_runtime { self._newError["URIError"] = self.defineError("URIError") self.eval = self.GlobalObject.get("eval")._object() + // eval.prototype === undefined + self.eval.stash.delete("prototype") self.GlobalObject.prototype = self.Global.ObjectPrototype return self diff --git a/global_test.go b/global_test.go index a6dfcb7..735397d 100644 --- a/global_test.go +++ b/global_test.go @@ -45,6 +45,7 @@ func TestGlobal(t *testing.T) { test(`this.hasOwnProperty`, "[function]") test(`eval.length === 1`, "true") + test(`eval.prototype === undefined`, "true") } func TestGlobalLength(t *testing.T) {