@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
@@ -1563,7 +1563,7 @@ class Http {
1563
1563
  error: error_?.code || 0,
1564
1564
  errorDescription: error_?.message || ""
1565
1565
  };
1566
- if (error_ instanceof axios.AxiosError && error_.response && error_.response.data) {
1566
+ if (error_ instanceof axios.AxiosError && error_.response && error_.response.data && !Type.isUndefined(error_.response.data.error)) {
1567
1567
  const response = error_.response.data;
1568
1568
  answerError = {
1569
1569
  error: response.error,
@@ -1647,7 +1647,7 @@ class Http {
1647
1647
  result.logTag = this.#logTag;
1648
1648
  }
1649
1649
  result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
1650
- result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.5";
1650
+ result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.6";
1651
1651
  if (!!result.data && !!result.data.start) {
1652
1652
  delete result.data.start;
1653
1653
  }
@@ -1681,7 +1681,7 @@ class Http {
1681
1681
  * @protected
1682
1682
  */
1683
1683
  isServerSide() {
1684
- return Type.isUndefined(window);
1684
+ return typeof window === "undefined";
1685
1685
  }
1686
1686
  // endregion ////
1687
1687
  }
@@ -1924,7 +1924,7 @@ class FormatterNumbers {
1924
1924
  format(value, locale) {
1925
1925
  let formatter;
1926
1926
  if (typeof locale === "undefined" || !Type.isStringFilled(locale)) {
1927
- locale = Type.isStringFilled(this._defLocale) ? this._defLocale || "en" : navigator?.language;
1927
+ locale = Type.isStringFilled(this._defLocale) ? this._defLocale || "en" : typeof navigator === "undefined" ? "en" : navigator?.language || "en";
1928
1928
  }
1929
1929
  if (Number.isInteger(value)) {
1930
1930
  formatter = new Intl.NumberFormat(locale, {