@shwfed/nuxt 0.1.57 → 0.1.58
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/dist/module.json
CHANGED
|
@@ -316,11 +316,12 @@ const activeTab = useSessionStorage("navigation-active-tab", void 0, {
|
|
|
316
316
|
onMounted(() => {
|
|
317
317
|
const baseRaw = app.baseURL ?? "/";
|
|
318
318
|
const base = baseRaw === "" || baseRaw === "/" ? "/" : baseRaw.replace(/\/*$/, "") + "/";
|
|
319
|
+
const pathOnly = route.fullPath.replace(/\?.*$/, "").replace(/#.*$/, "");
|
|
319
320
|
let pathToMatch;
|
|
320
321
|
if (base === "/") {
|
|
321
|
-
pathToMatch =
|
|
322
|
-
} else if (
|
|
323
|
-
const remainder =
|
|
322
|
+
pathToMatch = pathOnly;
|
|
323
|
+
} else if (pathOnly.startsWith(base) || pathOnly === base.slice(0, -1)) {
|
|
324
|
+
const remainder = pathOnly === base.slice(0, -1) ? "/" : pathOnly.slice(base.length) || "/";
|
|
324
325
|
pathToMatch = remainder.startsWith("/") ? remainder : `/${remainder}`;
|
|
325
326
|
} else {
|
|
326
327
|
pathToMatch = route.path;
|