@antscorp/antsomi-ui 1.3.5-beta.592 → 1.3.5-beta.593
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.
|
@@ -31,9 +31,13 @@ export const useNavigatePath = () => {
|
|
|
31
31
|
const splitNextPath = (path === null || path === void 0 ? void 0 : path.split('#')) || ['', ''];
|
|
32
32
|
const isCurrentPathIncludeHash = (_b = (_a = window.location) === null || _a === void 0 ? void 0 : _a.href) === null || _b === void 0 ? void 0 : _b.includes('#');
|
|
33
33
|
const isNextPathIncludeHash = path === null || path === void 0 ? void 0 : path.includes('#');
|
|
34
|
-
if (isCurrentPathIncludeHash
|
|
34
|
+
if (isCurrentPathIncludeHash) {
|
|
35
35
|
const currentRoute = ((_e = (_d = (_c = window.location.href) === null || _c === void 0 ? void 0 : _c.split) === null || _d === void 0 ? void 0 : _d['#']) === null || _e === void 0 ? void 0 : _e[0]) || '';
|
|
36
|
-
|
|
36
|
+
let nextRoute = customDomain;
|
|
37
|
+
// Check case next path has hash
|
|
38
|
+
if (isNextPathIncludeHash) {
|
|
39
|
+
nextRoute = `${customDomain}${splitNextPath[0]}`;
|
|
40
|
+
}
|
|
37
41
|
return currentRoute !== nextRoute;
|
|
38
42
|
}
|
|
39
43
|
return !!customDomain && customDomain !== ((_f = window.location) === null || _f === void 0 ? void 0 : _f.origin);
|