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 missing args variable error in JS Experimental #228

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

lorisleiva
Copy link
Collaborator

Fix an error in the JS Experimental renderer that causes a Cannot find name 'args' error.

This is because when an instruction has no arguments, the args variable won't be generated. However, when an instruction has remaining accounts that rely on the argumentValueNode, then we need that variable to exist.

The fix is to update the value of the hasAnyArgs helper to also include remainingAccountsNodes of values argumentValueNode.

@lorisleiva lorisleiva self-assigned this Apr 29, 2024
Copy link

changeset-bot bot commented Apr 29, 2024

🦋 Changeset detected

Latest commit: 35a1546

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@metaplex-foundation/kinobi Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lorisleiva lorisleiva merged commit 2c1eb2e into main Apr 29, 2024
6 checks passed
@lorisleiva lorisleiva deleted the loris/fix-missing-args-variable-error branch April 29, 2024 15:26
@github-actions github-actions bot mentioned this pull request Apr 29, 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.

1 participant