@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ _04 Jul 2025_
4
+
5
+ ## v1.32.1
6
+
7
+ - Fixed issue with router data overwriting the orginal route definition
8
+
3
9
  _02 Jul 2025_
4
10
 
5
11
  ## v1.32.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightningjs/blits",
3
- "version": "1.32.0",
3
+ "version": "1.32.1",
4
4
  "description": "Blits: The Lightning 3 App Development Framework",
5
5
  "bin": "bin/index.js",
6
6
  "exports": {
@@ -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