Skip to content

Commit

Permalink
fix(compartment-mapper): Make bundled code more robust against primor…
Browse files Browse the repository at this point in the history
…dial replacement/manipulation (#2725)

Ref #2707 (comment)
  • Loading branch information
gibson042 authored Feb 17, 2025
1 parent bc34d40 commit 9aac805
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/compartment-mapper/src/bundle-lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ export const makeFunctorFromMap = async (
}),
set: freeze((newValue) => {
value = newValue;
for (const observe of observers) {
for (let i = 0; i < observers.length; i += 1) {
const observe = observers[i];
observe(value);
}
}),
Expand Down

0 comments on commit 9aac805

Please sign in to comment.