MCPcopy Create free account
hub / github.com/ember-learn/ember-api-docs / beforeModel

Method beforeModel

app/routes/not-found.js:7–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5 if (typeof window === 'undefined' || !window.location) {
6 return;
7 }
8 const url = new URL(window.location.href);
9 const anchor = url.searchParams.get('anchor');
10 const redirected = url.searchParams.get('redirected');
11 if (anchor && !redirected) {
12 url.searchParams.set('redirected', '1');
13 // If we get here with an anchor query param, it means something in the
14 // api docs app is continuing to link to it (sometimes in the markdown)
15 // Force full reload to get netlify redirects
16 window.location.replace(url.toString());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected