@akanjs/client 0.9.39 → 0.9.41

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/cjs/src/router.js CHANGED
@@ -105,15 +105,15 @@ class Router {
105
105
  #initCSRClientRouter(options) {
106
106
  this.#instance = {
107
107
  push: (href, routeOptions) => {
108
- const { path, pathname, hash } = this.#getPathInfo(href);
108
+ const { path, pathname, hash, href: fullHref } = this.#getPathInfo(href);
109
109
  this.#postPathChange({ path, pathname, hash });
110
- options.router.push(`${pathname}${hash ? `#${hash}` : ""}`, routeOptions);
110
+ options.router.push(fullHref, routeOptions);
111
111
  },
112
112
  replace: (href, routeOptions) => {
113
- const { path, pathname, hash } = this.#getPathInfo(href);
113
+ const { path, pathname, hash, href: fullHref } = this.#getPathInfo(href);
114
114
  this.#postPathChange({ path, pathname, hash });
115
115
  setTimeout(() => {
116
- options.router.replace(`${pathname}${hash ? `#${hash}` : ""}`, routeOptions);
116
+ options.router.replace(fullHref, routeOptions);
117
117
  }, 0);
118
118
  },
119
119
  back: (routeOptions) => {
package/esm/src/router.js CHANGED
@@ -82,15 +82,15 @@ class Router {
82
82
  #initCSRClientRouter(options) {
83
83
  this.#instance = {
84
84
  push: (href, routeOptions) => {
85
- const { path, pathname, hash } = this.#getPathInfo(href);
85
+ const { path, pathname, hash, href: fullHref } = this.#getPathInfo(href);
86
86
  this.#postPathChange({ path, pathname, hash });
87
- options.router.push(`${pathname}${hash ? `#${hash}` : ""}`, routeOptions);
87
+ options.router.push(fullHref, routeOptions);
88
88
  },
89
89
  replace: (href, routeOptions) => {
90
- const { path, pathname, hash } = this.#getPathInfo(href);
90
+ const { path, pathname, hash, href: fullHref } = this.#getPathInfo(href);
91
91
  this.#postPathChange({ path, pathname, hash });
92
92
  setTimeout(() => {
93
- options.router.replace(`${pathname}${hash ? `#${hash}` : ""}`, routeOptions);
93
+ options.router.replace(fullHref, routeOptions);
94
94
  }, 0);
95
95
  },
96
96
  back: (routeOptions) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/client",
3
- "version": "0.9.39",
3
+ "version": "0.9.41",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"