fix(javascript): preserve local reference store ownership

This commit is contained in:
morluto committed 2026-10-24 08:22:13 +08:00
1 parent 59553c76be
commit 07005b8fe6
5 files changed
+29 -2

No files matched your search

@@ -650,7 +650,8 @@ export function* indexJavaScriptAmbientWritesSteps(
local = true;
},
);
if (!local || ambient.length > 0)
if (!local || ambient.length > 0) {
state.escapingReferenceStores.add(source.target);
escapes.push({
node: source.mutation,
target: source.node,
@@ -659,6 +660,7 @@ export function* indexJavaScriptAmbientWritesSteps(
key === null || typeof key === "object" ? null : String(key),
),
});
}
}
for (const { node, path } of writes) {
const target =