Skip to content

Commit 22ef564

Browse files
Validating the object when update the entries with assets (#114)
Co-authored-by: Nadeem <110535104+nadeem-cs@users.noreply.github.com>
1 parent 0412889 commit 22ef564

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
## [v1.15.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.15.0) (2024-01-23)
33
- Feature
44
- Taxonomy Import/Export feature added
5+
## [v1.14.1](https://github.com/contentstack/contentstack-management-javascript/tree/v1.14.1) (2024-11-23)
6+
- Fixes
7+
- Fix for validating the data while updating entries with assets
58
## [v1.14.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.14.0) (2023-12-19)
69
- Feature
710
- Management token feature added

lib/entity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ function isAsset (data) {
317317
}
318318

319319
export function cleanAssets (data) {
320-
if (typeof data === "object" && Object.keys(data).length > 0) {
320+
if (data && typeof data === "object" && Object.keys(data).length > 0) {
321321
const keys = Object.keys(data);
322322
for (const key of keys) {
323323
if (typeof data[key] === "object" && Object.keys(data[key]).length > 0) {

0 commit comments

Comments
 (0)