Skip to content

Commit 4aed3f8

Browse files
committed
Patched gallery duplication on multi-image upload
Quick patch to clear the gallery display when getting the first page. Duplication of the galler was occuring due to the mulitple upload events loading the gallery mulitple times while only clearing the existing gallery at the start of all refreshes. A bit flashy in terms of user experience, as there will still be mulitple load/clear events but fixes the duplication. Could be done more elegently in future by communicating up image upload counts. For #3160
1 parent 7b40861 commit 4aed3f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/js/components/image-manager.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ class ImageManager {
122122
};
123123

124124
const {data: html} = await window.$http.get(`images/${this.type}`, params);
125+
if (params.page === 1) {
126+
this.listContainer.innerHTML = '';
127+
}
125128
this.addReturnedHtmlElementsToList(html);
126129
removeLoading(this.listContainer);
127130
}

0 commit comments

Comments
 (0)