File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
tests/runtime-runes/samples/state-onchange-arrays Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,17 @@ export function create_proxy(value, onchanges) {
201201 v = Reflect . get ( target , prop , receiver ) ;
202202
203203 if ( is_proxied_array && array_methods . includes ( /** @type {string } */ ( prop ) ) ) {
204- return batch_onchange ( v ) ;
204+ // @ts -expect-error
205+ return function ( ...args ) {
206+ try {
207+ batching = true ;
208+
209+ // @ts -expect-error
210+ return v . apply ( this , args ) ;
211+ } finally {
212+ batching = false ;
213+ }
214+ } ;
205215 }
206216
207217 return v ;
Original file line number Diff line number Diff line change 88
99<button onclick ={()=> arr .push (arr .length )}>push</button >
1010<button onclick ={()=> arr .splice (0 , 2 )}>splice</button >
11- <button onclick ={()=> arr .sort ((a ,b )=> b - a )}>sort</button >
11+ <button onclick ={()=> arr .sort ((a ,b )=> b - a )}>sort</button >
You can’t perform that action at this time.
0 commit comments