Skip to content

Commit

Permalink
fix store array
Browse files Browse the repository at this point in the history
  • Loading branch information
Varixo committed Aug 16, 2024
1 parent eb917f8 commit 03fa2d1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/qwik/src/core/v2/signal/v2-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,15 @@ export class StoreHandler<T extends Record<string | symbol, any>> implements Pro
if (value !== oldValue) {
DEBUG && log('Signal.set', oldValue, '->', value, pad('\n' + this.toString(), ' '));
(target as any)[p] = value;
triggerEffects(this.$container$, this, this.$effects$ ? this.$effects$[String(p)] : null);
triggerEffects(
this.$container$,
this,
this.$effects$
? Array.isArray(target)
? Object.values(this.$effects$).flatMap((effects) => effects)
: this.$effects$[String(p)]
: null
);
}
return true;
}
Expand Down

0 comments on commit 03fa2d1

Please sign in to comment.