From 796e6b40bf0d1596bf7a8a81cc04ee27711e850e Mon Sep 17 00:00:00 2001 From: pix666 Date: Tue, 12 Dec 2023 22:32:33 +0400 Subject: [PATCH] fix deprecated itemType usage --- CHANGELOG.md | 6 ++++++ .../static/paper_uploads/src/js/widgets/collection.js | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4c0344..842484c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [0.18.2](https://github.com/dldevinc/paper-streamfield/tree/v0.18.2) - 2023-12-12 + +### Bug Fixes + +- Fixed an issue with using deprecated `itemType` property. + ## [0.18.1](https://github.com/dldevinc/paper-streamfield/tree/v0.18.1) - 2023-12-12 ### Bug Fixes diff --git a/paper_uploads/static/paper_uploads/src/js/widgets/collection.js b/paper_uploads/static/paper_uploads/src/js/widgets/collection.js index 329ee16..5fa8534 100644 --- a/paper_uploads/static/paper_uploads/src/js/widgets/collection.js +++ b/paper_uploads/static/paper_uploads/src/js/widgets/collection.js @@ -870,8 +870,7 @@ class Collection extends EventEmitter { const dataElement = this.root.querySelector(this.config.dataJSON); const data = JSON.parse(dataElement.textContent); for (let itemData of data) { - const itemType = itemData.itemType; - + const itemType = itemData.type; const itemHTML = this.createItem(itemType, itemData); this.itemContainer.insertAdjacentHTML("beforeend", itemHTML);