@akanjs/client 0.0.149 → 0.0.151

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
@@ -109,7 +109,9 @@ class Router {
109
109
  if (location.pathname === pathname)
110
110
  return;
111
111
  this.#postPathChange({ path, pathname });
112
- options.router.replace(pathname);
112
+ setTimeout(() => {
113
+ options.router.replace(pathname);
114
+ }, 0);
113
115
  },
114
116
  back: () => {
115
117
  const { path, pathname } = this.#getPathInfo(document.referrer);
@@ -202,7 +204,7 @@ class Router {
202
204
  getFullPath(withLang = true) {
203
205
  if (import_base.baseClientEnv.side === "server")
204
206
  throw new Error("getPath is only available in client side");
205
- return `${withLang ? `/${this.#lang}` : ""}/${this.#prefix}${this.getPath()}`;
207
+ return `${withLang ? `/${this.#lang}/` : ""}${this.#prefix}${this.getPath()}`;
206
208
  }
207
209
  getPrefix() {
208
210
  return this.#prefix;
package/esm/src/router.js CHANGED
@@ -86,7 +86,9 @@ class Router {
86
86
  if (location.pathname === pathname)
87
87
  return;
88
88
  this.#postPathChange({ path, pathname });
89
- options.router.replace(pathname);
89
+ setTimeout(() => {
90
+ options.router.replace(pathname);
91
+ }, 0);
90
92
  },
91
93
  back: () => {
92
94
  const { path, pathname } = this.#getPathInfo(document.referrer);
@@ -179,7 +181,7 @@ class Router {
179
181
  getFullPath(withLang = true) {
180
182
  if (baseClientEnv.side === "server")
181
183
  throw new Error("getPath is only available in client side");
182
- return `${withLang ? `/${this.#lang}` : ""}/${this.#prefix}${this.getPath()}`;
184
+ return `${withLang ? `/${this.#lang}/` : ""}${this.#prefix}${this.getPath()}`;
183
185
  }
184
186
  getPrefix() {
185
187
  return this.#prefix;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/client",
3
- "version": "0.0.149",
3
+ "version": "0.0.151",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"