@@ -16,25 +16,23 @@ import { is_runes } from '../../../runtime.js';
16
16
export function bind_value ( input , get , set = get ) {
17
17
var runes = is_runes ( ) ;
18
18
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
+ }
25
24
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 ) ;
29
28
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
+ } ) ;
38
36
39
37
render_effect ( ( ) => {
40
38
if ( DEV && input . type === 'checkbox' ) {
0 commit comments