File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
packages/svelte/tests/runtime-runes/samples/async-resolve-stale Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 77 const r = Promise .withResolvers ();
88
99 if (prev || v === ' ' ) {
10- console .log (' hello' , !! prev)
1110 Promise .resolve ().then (async () => {
12- console .log (' count++' )
1311 count++ ;
1412 r .resolve (v);
1513 await new Promise (r => setTimeout (r, 0 ));
1614 // TODO with a microtask like below it still throws a mutation error
1715 // await Promise.resolve();
1816 prev? .resolve ();
19- })
17+ });
2018 } else {
21- console .log (' other' )
2219 prev = Promise .withResolvers ();
2320 prev .promise .then (() => {
24- console .log (' other coun++' )
2521 count++ ;
2622 r .resolve (v)
27- })
23+ });
2824 }
29-
25+
3026 return r .promise ;
3127 }
3228
3531
3632< input bind: value / >
3733
38- {count} | {x}
34+ {count} | {x}
You can’t perform that action at this time.
0 commit comments