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 error when setConfig is read-only #202

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

a-p-z
Copy link
Contributor

@a-p-z a-p-z commented May 24, 2022

When the method setConfig is read-only card-mod crashes.
I wrapped the variable Assignment in a try-catch.

card-mod.js:5 Uncaught (in promise) TypeError: Cannot set property setConfig of #<z> which has only a getter
    at card-mod.js:5:1163

@thomasloven
Copy link
Owner

When does this happen?

@a-p-z
Copy link
Contributor Author

a-p-z commented Nov 23, 2022

It happens when a card defines setConfig as read-only. In this case the visual editor crashes.
I noticed the issue in a card I created, using svelte.
Svelte makes the exported function read-only.

@thomasloven thomasloven merged commit 7ed51eb into thomasloven:master Nov 22, 2023
@thomasloven
Copy link
Owner

Thanks! I'm really sorry it's taken so long.

@a-p-z a-p-z deleted the fix-read-only-setConfig branch November 22, 2023 23:11
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.

2 participants