Skip to content

Commit d4e0a9d

Browse files
committed
cleanup, unrelated lint
1 parent fb6b40a commit d4e0a9d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/svelte/elements.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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'

packages/svelte/src/internal/client/reactivity/batch.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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
*/
486485
export 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;

0 commit comments

Comments
 (0)