@bitrix24/b24jssdk 0.1.5 → 0.1.6

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @version @bitrix24/b24jssdk v0.1.5
2
+ * @version @bitrix24/b24jssdk v0.1.6
3
3
  * @copyright (c) 2024 Bitrix24
4
4
  * @licence MIT
5
5
  * @links https://github.com/bitrix24/b24jssdk - GitHub
@@ -1548,7 +1548,7 @@ class Http {
1548
1548
  error: error_?.code || 0,
1549
1549
  errorDescription: error_?.message || ""
1550
1550
  };
1551
- if (error_ instanceof AxiosError && error_.response && error_.response.data) {
1551
+ if (error_ instanceof AxiosError && error_.response && error_.response.data && !Type.isUndefined(error_.response.data.error)) {
1552
1552
  const response = error_.response.data;
1553
1553
  answerError = {
1554
1554
  error: response.error,
@@ -1632,7 +1632,7 @@ class Http {
1632
1632
  result.logTag = this.#logTag;
1633
1633
  }
1634
1634
  result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
1635
- result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.5";
1635
+ result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.6";
1636
1636
  if (!!result.data && !!result.data.start) {
1637
1637
  delete result.data.start;
1638
1638
  }
@@ -1666,7 +1666,7 @@ class Http {
1666
1666
  * @protected
1667
1667
  */
1668
1668
  isServerSide() {
1669
- return Type.isUndefined(window);
1669
+ return typeof window === "undefined";
1670
1670
  }
1671
1671
  // endregion ////
1672
1672
  }
@@ -1909,7 +1909,7 @@ class FormatterNumbers {
1909
1909
  format(value, locale) {
1910
1910
  let formatter;
1911
1911
  if (typeof locale === "undefined" || !Type.isStringFilled(locale)) {
1912
- locale = Type.isStringFilled(this._defLocale) ? this._defLocale || "en" : navigator?.language;
1912
+ locale = Type.isStringFilled(this._defLocale) ? this._defLocale || "en" : typeof navigator === "undefined" ? "en" : navigator?.language || "en";
1913
1913
  }
1914
1914
  if (Number.isInteger(value)) {
1915
1915
  formatter = new Intl.NumberFormat(locale, {