fix: Fixes error thrown on use of select with no options (#18449)

Fixes #18445.
pull/14594/merge
Ashok Kaushik 12 hours ago committed by GitHub
parent f2648b3537
commit 6f5dd04a00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: prevent malformed AST output for `<select>` with static `value` attribute

@ -161,7 +161,7 @@ export function is_static_element(node) {
}
if (
['input', 'textarea'].includes(node.name) &&
['input', 'textarea', 'select'].includes(node.name) &&
['value', 'checked'].includes(attribute.name)
) {
return false;

Loading…
Cancel
Save