Skip to content

Commit

Permalink
fix: always treat data as immutable, fixing Redux issues
Browse files Browse the repository at this point in the history
  • Loading branch information
missilev authored Nov 7, 2024
1 parent cb90f5d commit 51154e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/lib/setup-zone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const setupZone = <UserData extends Data>(
// Preprocess to ensure zones is not undefined
const newData = {
...data,
zones: data.zones || {},
zones: data.zones ? { ...data.zones } : {},
};

newData.zones[zoneKey] = newData.zones[zoneKey] || [];
Expand Down

0 comments on commit 51154e9

Please sign in to comment.