@antscorp/antsomi-ui 1.3.5-beta.592 → 1.3.5-beta.594

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,12 +31,15 @@ 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 && isNextPathIncludeHash) {
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
- const nextRoute = `${customDomain}${splitNextPath[0]}`;
37
- return currentRoute !== nextRoute;
34
+ let currentDomain = (_c = window.location) === null || _c === void 0 ? void 0 : _c.origin;
35
+ let nextDomain = customDomain;
36
+ if (isCurrentPathIncludeHash) {
37
+ currentDomain = ((_f = (_e = (_d = window.location.href) === null || _d === void 0 ? void 0 : _d.split) === null || _e === void 0 ? void 0 : _e['#']) === null || _f === void 0 ? void 0 : _f[0]) || '';
38
38
  }
39
- return !!customDomain && customDomain !== ((_f = window.location) === null || _f === void 0 ? void 0 : _f.origin);
39
+ if (isNextPathIncludeHash) {
40
+ nextDomain = `${customDomain}${splitNextPath[0]}`;
41
+ }
42
+ return currentDomain !== nextDomain;
40
43
  }, [isDev]);
41
44
  const getPath = useCallback((path, itemKey) => {
42
45
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.592",
3
+ "version": "1.3.5-beta.594",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",