File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
src/internal/client/reactivity Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1268,7 +1268,7 @@ export interface HTMLMetaAttributes extends HTMLAttributes<HTMLMetaElement> {
12681268 charset ?: string | undefined | null ;
12691269 content ?: string | undefined | null ;
12701270 'http-equiv' ?:
1271- | 'accept-ch'
1271+ | 'accept-ch'
12721272 | 'content-security-policy'
12731273 | 'content-type'
12741274 | 'default-style'
Original file line number Diff line number Diff line change @@ -187,8 +187,7 @@ export class Batch {
187187 // if there are multiple batches, we are 'time travelling' —
188188 // we need to undo the changes belonging to any batch
189189 // other than the current one
190- // TODO this is wrong when flushSync is called while another batch is active, can be two when there's actually no time traveling
191- if ( batches . size > 1 ) {
190+ if ( async_mode_flag && batches . size > 1 ) {
192191 current_values = new Map ( ) ;
193192 batch_deriveds = new Map ( ) ;
194193
@@ -485,8 +484,8 @@ export class Batch {
485484 */
486485export function flushSync ( fn ) {
487486 if ( async_mode_flag && active_effect !== null ) {
488- // TODO why do we disallow this?
489- // e.flush_sync_in_effect();
487+ // We disallow this because it creates super-hard to reason about stack trace and because it's generally a bad idea
488+ e . flush_sync_in_effect ( ) ;
490489 }
491490
492491 var was_flushing_sync = is_flushing_sync ;
You can’t perform that action at this time.
0 commit comments