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

defaults.js: fix the opened event with mp.input.get #15302

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

guidocella
Copy link
Contributor

The opened event doesn't send any arguments. Don't call JSON.parse(undefined) in that case because it errors.

Fixes eb4c6be, fixes #15301.

Copy link

github-actions bot commented Nov 13, 2024

Download the artifacts for this pull request:

Windows
macOS

The opened event doesn't send any arguments. Don't call
JSON.parse(undefined) in that case because it errors.

Fixes eb4c6be, fixes mpv-player#15301.
Only send how many arguments were actually passed by console.lua instead
of sending extra undefined arguments.
@sfan5 sfan5 merged commit 1c3f092 into mpv-player:master Nov 14, 2024
25 checks passed
@guidocella guidocella deleted the js-input branch November 14, 2024 10:09
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.

mp.input.get({opened: }) SyntaxError: JSON:1: unexpected character: 'u'
3 participants