Skip to content

Bootstrap: Only attempt to spread msg.args if it is defined - #3

Merged
nihas101 merged 1 commit into
mainfrom
bugfix/bootstrap
Jun 15, 2026
Merged

nihas101 merged 1 commit into
mainfrom
bugfix/bootstrap

Conversation

@nihas101

@nihas101 nihas101 commented Jun 15, 2026 •

Copy link
Copy Markdown
Owner

If a lua plugin attempted to call a javascript function without an argument (i.e. msg.args is null), the spread operator in window[msg.function](...msg.args); would fail and the function would not be called.

With this commit we now check beforehand if msg.args is defined (and not null) before attempting to use the spread operator on it.

@nihas101 nihas101 self-assigned this Jun 15, 2026
@nihas101 nihas101 added the bug Something isn't working label Jun 15, 2026
@nihas101
nihas101 merged commit e7b446a into main Jun 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant