From 36a214ecbf2e038fb2f106f436174c85662a02a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 6 Feb 2024 17:10:20 +0300 Subject: [PATCH] Use gojaValueExists in exportArg --- browser/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/helpers.go b/browser/helpers.go index 66965e578..47375281f 100644 --- a/browser/helpers.go +++ b/browser/helpers.go @@ -19,7 +19,7 @@ func panicIfFatalError(ctx context.Context, err error) { // exportArg exports the value and returns it. // It returns nil if the value is undefined or null. func exportArg(gv goja.Value) any { - if gv == nil || gv == goja.Undefined() || gv == goja.Null() { + if !gojaValueExists(gv) { return nil } return gv.Export()