Skip to content

Commit 664a7db

Browse files
liximomoclaude
andcommitted
refactor(doura): simplify triggerEffects to only accept Dep
The ReactiveEffect[] branch in triggerEffects was inherited from Vue 3 but never used in doura — all three call sites pass a Dep (Set). Remove the unused union type and the isArray check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ba0e74d commit 664a7db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/doura/src/reactivity/effect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ export function trigger(
359359
}
360360
}
361361

362-
export function triggerEffects(dep: Dep | ReactiveEffect[]) {
362+
export function triggerEffects(dep: Dep) {
363363
// spread into array for stabilization
364-
const effects = isArray(dep) ? dep : [...dep]
364+
const effects = [...dep]
365365
for (const effect of effects) {
366366
if (effect.view) {
367367
triggerEffect(effect)

0 commit comments

Comments
 (0)