@remix-run/router 0.0.0-experimental-d90c8fb3 → 0.0.0-experimental-114cf0b7
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/dist/router.cjs.js +5 -1
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +5 -1
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +5 -1
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/history.ts +4 -0
- package/package.json +1 -1
package/dist/router.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v0.0.0-experimental-
|
|
2
|
+
* @remix-run/router v0.0.0-experimental-114cf0b7
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -496,6 +496,10 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options)
|
|
|
496
496
|
// See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
|
|
497
497
|
let base = window.location.origin !== "null" ? window.location.origin : window.location.href;
|
|
498
498
|
let href = typeof to === "string" ? to : createPath(to);
|
|
499
|
+
// Treating this as a full URL will strip any trailing spaces so we need to
|
|
500
|
+
// pre-encode them since they might be part of a matching splat param from
|
|
501
|
+
// an ancestor route
|
|
502
|
+
href = href.replace(/ $/, "%20");
|
|
499
503
|
invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);
|
|
500
504
|
return new URL(href, base);
|
|
501
505
|
}
|