From 16e141b8c32c0e4f0ce8118627862f0523245fd4 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Wed, 20 Apr 2022 11:00:26 +0200 Subject: [PATCH] fixup! js/common: Helper for Object.freeze from Go --- js/common/frozen_object.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/common/frozen_object.go b/js/common/frozen_object.go index ee36ef742175..9f0c872a6a52 100644 --- a/js/common/frozen_object.go +++ b/js/common/frozen_object.go @@ -11,11 +11,11 @@ func FreezeObject(rt *goja.Runtime, obj goja.Value) error { global := rt.GlobalObject().Get("Object").ToObject(rt) freeze, ok := goja.AssertFunction(global.Get("freeze")) if !ok { - panic(fmt.Errorf("failed to get the Object.freeze function from the runtime")) + panic("failed to get the Object.freeze function from the runtime") } isFrozen, ok := goja.AssertFunction(global.Get("isFrozen")) if !ok { - panic(fmt.Errorf("failed to get the Object.isFrozen function from the runtime")) + panic("failed to get the Object.isFrozen function from the runtime") } fobj := &freezing{ global: global,