diff --git a/frontend/src/lib/actingUser.svelte.ts b/frontend/src/lib/actingUser.svelte.ts index 784b98043c..30da65ff83 100644 --- a/frontend/src/lib/actingUser.svelte.ts +++ b/frontend/src/lib/actingUser.svelte.ts @@ -18,8 +18,6 @@ import { getWorkspaceRole, type RoleLookup } from '$lib/user' export function useActingUser(workspace: () => string | undefined) { const navWorkspace = fromStore(workspaceStore) const navUser = fromStore(userStore) - // A Map, not an object: a workspace may legitimately be named `constructor`, which a plain - // object would answer for out of its prototype. const looked = new SvelteMap() // The workspace this effect last acted on, so arriving at one is distinguishable from the // effect re-running while already there. diff --git a/frontend/src/lib/components/ResourceEditor.svelte b/frontend/src/lib/components/ResourceEditor.svelte index 73315664fe..bcb886ee7d 100644 --- a/frontend/src/lib/components/ResourceEditor.svelte +++ b/frontend/src/lib/components/ResourceEditor.svelte @@ -87,6 +87,9 @@ // releasing them on component teardown. `states` indexes the resulting // handles by workspace ID for ergonomic lookup downstream. let workspaceSpecs = $state>([]) + // Plain objects keyed by workspace id, so an id that is also an `Object.prototype` key + // (`constructor`, …) reads as already present and the resource never loads. Such ids are + // deliberately unsupported: too unlikely to be worth guarding every read. let initialStates: Record = $state({}) let existedInitially: Record = $state({}) let fetchedResources: Record = $state({}) diff --git a/frontend/src/lib/components/VariableEditor.svelte b/frontend/src/lib/components/VariableEditor.svelte index b18b48161c..7c935be45c 100644 --- a/frontend/src/lib/components/VariableEditor.svelte +++ b/frontend/src/lib/components/VariableEditor.svelte @@ -51,6 +51,9 @@ // releasing them on component teardown. `states` indexes the resulting // handles by workspace ID for ergonomic lookup downstream. let workspaceSpecs = $state>([]) + // Plain objects keyed by workspace id, so an id that is also an `Object.prototype` key + // (`constructor`, …) reads as already present and the variable never loads. Such ids are + // deliberately unsupported: too unlikely to be worth guarding every read. let initialStates: Record = $state({}) let existedInitially: Record = $state({}) let extraPerms: Record> = $state({})