@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.
package/dist/umd/index.js CHANGED
@@ -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
@@ -14259,7 +14259,7 @@
14259
14259
  error: error_?.code || 0,
14260
14260
  errorDescription: error_?.message || ""
14261
14261
  };
14262
- if (error_ instanceof AxiosError && error_.response && error_.response.data) {
14262
+ if (error_ instanceof AxiosError && error_.response && error_.response.data && !Type.isUndefined(error_.response.data.error)) {
14263
14263
  const response = error_.response.data;
14264
14264
  answerError = {
14265
14265
  error: response.error,
@@ -14343,7 +14343,7 @@
14343
14343
  result.logTag = this.#logTag;
14344
14344
  }
14345
14345
  result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
14346
- result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.5";
14346
+ result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.6";
14347
14347
  if (!!result.data && !!result.data.start) {
14348
14348
  delete result.data.start;
14349
14349
  }
@@ -14377,7 +14377,7 @@
14377
14377
  * @protected
14378
14378
  */
14379
14379
  isServerSide() {
14380
- return Type.isUndefined(window);
14380
+ return typeof window === "undefined";
14381
14381
  }
14382
14382
  // endregion ////
14383
14383
  }
@@ -14620,7 +14620,7 @@
14620
14620
  format(value, locale) {
14621
14621
  let formatter;
14622
14622
  if (typeof locale === "undefined" || !Type.isStringFilled(locale)) {
14623
- locale = Type.isStringFilled(this._defLocale) ? this._defLocale || "en" : navigator?.language;
14623
+ locale = Type.isStringFilled(this._defLocale) ? this._defLocale || "en" : typeof navigator === "undefined" ? "en" : navigator?.language || "en";
14624
14624
  }
14625
14625
  if (Number.isInteger(value)) {
14626
14626
  formatter = new Intl.NumberFormat(locale, {