Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 1204: panic while exporting nil sobek values #1205

Merged
merged 6 commits into from
Feb 6, 2024

Conversation

inancgumus
Copy link
Member

What?

Why?

  • To prevent panics while passing null values to methods.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates: #1204

Exports the Goja values if they're not nil. For the arrays, exportArgs
leave the nil values within the array. This is because users want to
pass nil values to their functions (i.e., Evaluate).
This is for testing the mapping layer's behavior when evaluate is called
without an array.
@inancgumus inancgumus force-pushed the fix/1204-fix-panic-while-exporting-nil-goja-values branch from 67133a3 to b7da453 Compare February 2, 2024 09:28
@inancgumus inancgumus self-assigned this Feb 2, 2024
ankur22
ankur22 previously approved these changes Feb 5, 2024
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

browser/mapping.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@inancgumus inancgumus merged commit 800972f into main Feb 6, 2024
17 checks passed
@inancgumus inancgumus deleted the fix/1204-fix-panic-while-exporting-nil-goja-values branch February 6, 2024 14:26
@inancgumus inancgumus changed the title Fix 1204: panic while exporting nil goja values Fix 1204: panic while exporting nil sobek values Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix panic while exporting a nil Goja value
2 participants