@@ -16,25 +16,23 @@ import { is_runes } from '../../../runtime.js';
1616export function bind_value ( input , get , set = get ) {
1717 var runes = is_runes ( ) ;
1818
19- listen_to_event_and_reset_event ( input , 'input' , ( ) =>
20- without_reactive_context ( ( ) => {
21- if ( DEV && input . type === 'checkbox' ) {
22- // TODO should this happen in prod too?
23- e . bind_invalid_checkbox_value ( ) ;
24- }
19+ listen_to_event_and_reset_event ( input , 'input' , ( ) => {
20+ if ( DEV && input . type === 'checkbox' ) {
21+ // TODO should this happen in prod too?
22+ e . bind_invalid_checkbox_value ( ) ;
23+ }
2524
26- /** @type {unknown } */
27- var value = is_numberlike_input ( input ) ? to_number ( input . value ) : input . value ;
28- set ( value ) ;
25+ /** @type {unknown } */
26+ var value = is_numberlike_input ( input ) ? to_number ( input . value ) : input . value ;
27+ set ( value ) ;
2928
30- // In runes mode, respect any validation in accessors (doesn't apply in legacy mode,
31- // because we use mutable state which ensures the render effect always runs)
32- if ( runes && value !== ( value = get ( ) ) ) {
33- // @ts -expect-error the value is coerced on assignment
34- input . value = value ?? '' ;
35- }
36- } )
37- ) ;
29+ // In runes mode, respect any validation in accessors (doesn't apply in legacy mode,
30+ // because we use mutable state which ensures the render effect always runs)
31+ if ( runes && value !== ( value = get ( ) ) ) {
32+ // @ts -expect-error the value is coerced on assignment
33+ input . value = value ?? '' ;
34+ }
35+ } ) ;
3836
3937 render_effect ( ( ) => {
4038 if ( DEV && input . type === 'checkbox' ) {
0 commit comments