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

Remove fallback when changing the type instead of using an effect #563

Merged

Conversation

kudlajz
Copy link
Contributor

@kudlajz kudlajz commented Aug 8, 2024

Based on the feedback in #562 (comment).

@kudlajz kudlajz requested a review from e1himself August 8, 2024 12:27
@kudlajz kudlajz self-assigned this Aug 8, 2024
Copy link
Contributor

@e1himself e1himself left a comment

Choose a reason for hiding this comment

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

Thanks Lukas! 👍

@kudlajz kudlajz merged commit 8a453e4 into main Aug 8, 2024
9 checks passed
@kudlajz kudlajz deleted the fix/dev-13267-dont-use-null-as-a-possible-value-for-fallback branch August 8, 2024 12:34
const newOption = options.find(({ value }) => value === newType);
if (newOption && !newOption.withFallback) {
updateVariable(editor, { fallback: '' });
} else {
updateVariable(editor, { key: newType });
Copy link
Contributor

Choose a reason for hiding this comment

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

You've forgot to add key: newType in the first branch of the if :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OMG 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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