@fy-/fws-vue 2.3.92 → 2.3.93

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": "@fy-/fws-vue",
3
- "version": "2.3.92",
3
+ "version": "2.3.93",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",
@@ -30,12 +30,18 @@ export const useServerRouter = defineStore('routerStore', {
30
30
  },
31
31
  push(path: any, status = 302) {
32
32
  this.status = status
33
- if (status !== 302) this.redirect = path
33
+ if (status !== 302) {
34
+ // Resolve path to string if it's a route location object
35
+ this.redirect = typeof path === 'string' ? path : this._router?.resolve(path)?.fullPath || path
36
+ }
34
37
  return this._router?.push(path)
35
38
  },
36
39
  replace(path: any, status = 302) {
37
40
  this.status = status
38
- if (status !== 302) this.redirect = path
41
+ if (status !== 302) {
42
+ // Resolve path to string if it's a route location object
43
+ this.redirect = typeof path === 'string' ? path : this._router?.resolve(path)?.fullPath || path
44
+ }
39
45
  return this._router?.replace(path)
40
46
  },
41
47
  go(delta: number) {