mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
test(sharing): read loadDocument as a headerless navigation sink
The connect and sign-in hand-offs moved from window.location writes onto the loadDocument helper, and the guard stopped seeing them. Its reference floor caught the drop. Watched red with a fenced thumbnail route handed to loadDocument.
This commit is contained in:
1 parent
f893dae004
commit
114ff4b4eb
1 file changed
+7
@@ -235,6 +235,13 @@ function headerlessReferences(file: string, source: string): Reference[] {
|
||||
)) {
|
||||
record(m.index, "window.location", m[1] ?? m[2] ?? "");
|
||||
}
|
||||
// `loadDocument(path)` (`src/lib/navigation/load-document.ts`) is a
|
||||
// `window.location.assign` behind a name, so it is the same sink. Without
|
||||
// this the connect and sign-in hand-offs that moved onto it would drop out
|
||||
// of view while the guard kept passing.
|
||||
for (const m of source.matchAll(/\bloadDocument\(\s*([^)\n]+)\)/g)) {
|
||||
record(m.index, "loadDocument", m[1]);
|
||||
}
|
||||
// The imperative form: `el.src = "/api/…"`. A JSX attribute is the common
|
||||
// shape and the one the real offenders had, but a script or image built in
|
||||
// an effect issues exactly the same headerless request — and the tree
|
||||
|
||||
Reference in new issue
Block a user