Skip to content

Commit

Permalink
Use gojaValueExists in exportArg
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Feb 6, 2024
1 parent f5f26e9 commit 36a214e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 36a214e

Please sign in to comment.