@kaspernj/api-maker 1.0.397 → 1.0.399

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaspernj/api-maker",
3
- "version": "1.0.397",
3
+ "version": "1.0.399",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",
@@ -120,7 +120,7 @@ const Route = memo(shapeComponent(class Route extends BaseComponent {
120
120
  break
121
121
  }
122
122
 
123
- const routePart = this.routeParts[pathPartIndex]
123
+ const routePart = decodeURIComponent(this.routeParts[pathPartIndex])
124
124
 
125
125
  if (pathPart.startsWith(":") && routePart) {
126
126
  const paramName = pathPart.slice(1, pathPart.length)
@@ -153,7 +153,7 @@ const Route = memo(shapeComponent(class Route extends BaseComponent {
153
153
  componentPathParts.push(component)
154
154
  }
155
155
 
156
- const newParams = Object.assign(this.currentParams, params)
156
+ const newParams = Object.assign({}, this.currentParams, params)
157
157
 
158
158
  this.setInstance({componentPathParts, match: {params}, newParams})
159
159
  this.setState({matches})
@@ -64,11 +64,9 @@ const Switch = memo(shapeComponent(class Switch extends BaseComponent {
64
64
 
65
65
  newPathsMatched[path] = matched
66
66
 
67
- const pathShown = this.pathShown(newPathsMatched)
68
-
69
67
  this.setState({
70
68
  lastUpdate: Math.random() + new Date().getTime(),
71
- pathShown,
69
+ pathShown: this.pathShown(newPathsMatched),
72
70
  pathsMatched: newPathsMatched
73
71
  })
74
72
  }