diff --git a/frontend/src/lib/store.contract.test.ts b/frontend/src/lib/store.contract.test.ts index 66aa18dc..04e397b4 100644 --- a/frontend/src/lib/store.contract.test.ts +++ b/frontend/src/lib/store.contract.test.ts @@ -15,7 +15,7 @@ describe("a store's use()", () => { for (const m of src.matchAll(/\b\w+\.use\(\)/g)) { const before = src.slice(0, m.index); const owners = [...before.matchAll(/(?:function\s+(\w+)|const\s+(\w+)\s*=\s*\()/g)]; - const owner = owners.at(-1); + const owner = owners[owners.length - 1]; const name = owner?.[1] ?? owner?.[2] ?? ""; if (!name.startsWith("use")) offenders.push(`${f}: ${m[0]} in ${name || "?"}`); }