Comparing version 3.4.0 to 3.4.1
@@ -69,3 +69,3 @@ import { IClientRequest } from "../common/ClientRequest"; | ||
* */ | ||
protected parseData(response?: IPaginatedResponse): this | undefined; | ||
protected parseData(response?: IPaginatedResponse): never[] | this | undefined; | ||
/** | ||
@@ -72,0 +72,0 @@ * Возвращает номер текущей страницы |
@@ -120,3 +120,10 @@ "use strict"; | ||
const { embedded, factory } = this.params; | ||
const data = (response === null || response === void 0 ? void 0 : response._embedded[embedded]) || []; | ||
if (!response) { | ||
return []; | ||
} | ||
const { _embedded } = response; | ||
if (!_embedded) { | ||
return []; | ||
} | ||
const data = _embedded[embedded] || []; | ||
if (!Array.isArray(data)) { | ||
@@ -123,0 +130,0 @@ return; |
{ | ||
"name": "amocrm-js", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "JS Library for AmoCRM", | ||
@@ -5,0 +5,0 @@ "main": "./dist/Client.js", |
@@ -517,4 +517,4 @@ | ||
Спасибо @amorev, @maxism, @shuraman69, @korovenko-tatyana, @lotgyero за вклад в разработку этого проекта | ||
Спасибо @amorev, @maxism, @shuraman69, @korovenko-tatyana, @lotgyero, @capfsb за вклад в разработку этого проекта | ||
Отдельная благодарность @dmitrytemlead за возможность протестировать библиотеку в стороннем проекте |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248816
185
4060