@redneckz/wildless-cms-uni-blocks 0.15.336 → 0.15.337

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.
@@ -2,6 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.isHrefActive = void 0;
3
3
  const url_1 = require("../../utils/url");
4
4
  const isHrefActive = (pathname) => ({ href }) => Boolean(href &&
5
- (0, url_1.withoutQuery)((0, url_1.isURL)(href) ? globalThis?.location.href : pathname).startsWith((0, url_1.withoutQuery)(href)));
5
+ (0, url_1.withoutQuery)((0, url_1.isURL)(href) ? globalThis?.location?.href : pathname).startsWith((0, url_1.withoutQuery)(href)));
6
6
  exports.isHrefActive = isHrefActive;
7
7
  //# sourceMappingURL=isHrefActive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":";;AAAA,yCAAsD;AAE/C,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,IAAA,kBAAY,EAAC,IAAA,WAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CACzE,IAAA,kBAAY,EAAC,IAAI,CAAC,CACnB,CACJ,CAAC;AARO,QAAA,YAAY,gBAQnB"}
1
+ {"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":";;AAAA,yCAAsD;AAE/C,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,IAAA,kBAAY,EAAC,IAAA,WAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CAC1E,IAAA,kBAAY,EAAC,IAAI,CAAC,CACnB,CACJ,CAAC;AARO,QAAA,YAAY,gBAQnB"}
@@ -1,4 +1,4 @@
1
1
  import { isURL, withoutQuery } from '../../utils/url.js';
2
2
  export const isHrefActive = (pathname) => ({ href }) => Boolean(href &&
3
- withoutQuery(isURL(href) ? globalThis?.location.href : pathname).startsWith(withoutQuery(href)));
3
+ withoutQuery(isURL(href) ? globalThis?.location?.href : pathname).startsWith(withoutQuery(href)));
4
4
  //# sourceMappingURL=isHrefActive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CACzE,YAAY,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC"}
1
+ {"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CAC1E,YAAY,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC"}
@@ -5,7 +5,7 @@ export const isHrefActive =
5
5
  ({ href }: { href?: string }): boolean =>
6
6
  Boolean(
7
7
  href &&
8
- withoutQuery(isURL(href) ? globalThis?.location.href : pathname).startsWith(
8
+ withoutQuery(isURL(href) ? globalThis?.location?.href : pathname).startsWith(
9
9
  withoutQuery(href),
10
10
  ),
11
11
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.15.336",
3
+ "version": "0.15.337",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -5,7 +5,7 @@ export const isHrefActive =
5
5
  ({ href }: { href?: string }): boolean =>
6
6
  Boolean(
7
7
  href &&
8
- withoutQuery(isURL(href) ? globalThis?.location.href : pathname).startsWith(
8
+ withoutQuery(isURL(href) ? globalThis?.location?.href : pathname).startsWith(
9
9
  withoutQuery(href),
10
10
  ),
11
11
  );