react-router-dom-v5-compat 6.22.0 → 6.22.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # `react-router-dom-v5-compat`
2
2
 
3
+ ## 6.22.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - `react-router@6.22.1`
9
+ - `react-router-dom@6.22.1`
10
+
3
11
  ## 6.22.0
4
12
 
5
13
  ### Minor Changes
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router DOM v5 Compat v6.22.0
2
+ * React Router DOM v5 Compat v6.22.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1510,6 +1510,10 @@ function StaticRouter(_ref2) {
1510
1510
  },
1511
1511
  encodeLocation(to) {
1512
1512
  let href = typeof to === "string" ? to : createPath$1(to);
1513
+ // Treating this as a full URL will strip any trailing spaces so we need to
1514
+ // pre-encode them since they might be part of a matching splat param from
1515
+ // an ancestor route
1516
+ href = href.replace(/ $/, "%20");
1513
1517
  let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, "http://localhost");
1514
1518
  return {
1515
1519
  pathname: encoded.pathname,