@lightningjs/blits 1.32.0 → 1.32.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 +6 -0
- package/package.json +1 -1
- package/src/router/router.js +2 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/router/router.js
CHANGED
|
@@ -132,7 +132,7 @@ export const matchHash = (path, routes = []) => {
|
|
|
132
132
|
let matchingRoute = false
|
|
133
133
|
let i = 0
|
|
134
134
|
while (!matchingRoute && i < routes.length) {
|
|
135
|
-
const route = routes[i]
|
|
135
|
+
const route = { ...routes[i] }
|
|
136
136
|
route.path = normalizePath(route.path)
|
|
137
137
|
if (route.path === path) {
|
|
138
138
|
route.params = {}
|
|
@@ -206,7 +206,6 @@ export const navigate = async function () {
|
|
|
206
206
|
let previousRoute = currentRoute //? Object.assign({}, currentRoute) : undefined
|
|
207
207
|
const { hash, path, queryParams } = getHash()
|
|
208
208
|
let route = matchHash(path, this.parent[symbols.routes])
|
|
209
|
-
|
|
210
209
|
const queryParamsData = {}
|
|
211
210
|
const queryParamsEntries = [...queryParams.entries()]
|
|
212
211
|
for (let i = 0; i < queryParamsEntries.length; i++) {
|
|
@@ -214,8 +213,8 @@ export const navigate = async function () {
|
|
|
214
213
|
}
|
|
215
214
|
|
|
216
215
|
route.data = {
|
|
217
|
-
...navigationData,
|
|
218
216
|
...route.data,
|
|
217
|
+
...navigationData,
|
|
219
218
|
...queryParamsData,
|
|
220
219
|
}
|
|
221
220
|
|