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] handle undefined select value with spread #6687

Conversation

Shinyaigeek
Copy link
Contributor

@Shinyaigeek Shinyaigeek commented Aug 27, 2021

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with [feat], [fix], [chore], or [docs].
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

Motivation

Fixes #6675

Hi team! <select /> element with bindings props is broken, so I fixed it. This issue is caused by passing undefined spread.value into <select /> value in handling spread props.

I fixed this issue by passing only when spread.value is not undefined as <input /> does.

If something wrong or not enough, please feel free to point out 🙏

@Shinyaigeek
Copy link
Contributor Author

Shinyaigeek commented Aug 27, 2021

I don’t know why CI test is failed in npm install without any change in package.json, package-lock.json and workflow file. Does anyone know why?

UPDATE: test seems to be passed, thank you!

@Conduitry Conduitry merged commit fc9241f into sveltejs:master Aug 27, 2021
@Conduitry
Copy link
Member

This looks like a good solution to me, thank you!

The test failure was just a network glitch when Puppeteer was trying to download the Chromium binary, so I manually re-ran the tests.

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.

Selected <select> value disappears in svelte 3.42.2
2 participants