mirror of https://github.com/sveltejs/svelte
fix(14815): warn when an invalid <select multiple> value is given (#14816)
* fix(14815): warn when an invalid <select multiple> value is given * Create nervous-stingrays-travel.mdpull/15967/head
parent
21d5448ab7
commit
de8094910d
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
Warn when an invalid `<select multiple>` value is given
|
@ -0,0 +1,7 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
warnings: [
|
||||
'The `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.'
|
||||
]
|
||||
});
|
@ -0,0 +1,9 @@
|
||||
<select multiple value={null}>
|
||||
<option>option</option>
|
||||
</select>
|
||||
<select multiple value={undefined}>
|
||||
<option>option</option>
|
||||
</select>
|
||||
<select multiple value={123}>
|
||||
<option>option</option>
|
||||
</select>
|
Loading…
Reference in new issue