@opentf/web 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/runtime/router.js +6 -0
package/package.json
CHANGED
package/runtime/router.js
CHANGED
|
@@ -338,7 +338,13 @@ export async function navigate(path, replace = false, isPop = false, hydrate = f
|
|
|
338
338
|
if (guard) {
|
|
339
339
|
let redirected = false;
|
|
340
340
|
const to = {
|
|
341
|
+
// `pathname` is the documented, platform-standard field (matches the URL API
|
|
342
|
+
// and `router.pathname`); `path` is kept as a back-compat alias. `fullPath`
|
|
343
|
+
// is the whole relative URL (pathname + query + hash), for guards that need to
|
|
344
|
+
// preserve or inspect the query/hash (e.g. redirect back after login).
|
|
345
|
+
pathname: url.pathname,
|
|
341
346
|
path: url.pathname,
|
|
347
|
+
fullPath: url.pathname + url.search + url.hash,
|
|
342
348
|
params: matchRoute(url.pathname)?.params || {},
|
|
343
349
|
query: Object.fromEntries(url.searchParams),
|
|
344
350
|
};
|