mirror of
https://github.com/morluto/rea
synced 2026-10-27 06:33:32 -04:00
fix(javascript): retain array identity after length mutations
Keep unknown element coverage on arrays whose length may have changed, preserving intrinsic length presence and subsequent slot mutations through semantic graph and export-return consumers.
This commit is contained in:
@@ -35,7 +35,13 @@ export const invalidateSemanticMutationPath = (
|
||||
const name = String(key);
|
||||
// Array length writes can remove every index; ordinary named properties
|
||||
// and sparse indices affect only their own slot.
|
||||
if (name === "length") return unknown;
|
||||
if (name === "length")
|
||||
return {
|
||||
status: "array",
|
||||
items: [],
|
||||
unknownItems: true,
|
||||
omittedItems: null,
|
||||
};
|
||||
const observed = value.items.some((item) => item.name === name);
|
||||
const items = value.items.map((item) =>
|
||||
item.name === name
|
||||
|
||||
Reference in New Issue
Block a user