Fixed image upload for missing images

This commit is contained in:
Eduard Urbach 2018-04-24 02:51:00 +02:00
parent ebefe894ee
commit 754f99e880

View File

@ -109,7 +109,13 @@ function previewImage(file: File, endpoint: string, previews: HTMLCollectionOf<E
for(let preview of previews) { for(let preview of previews) {
let img = preview as HTMLImageElement let img = preview as HTMLImageElement
img.classList.remove("hidden") img.classList.remove("hidden")
// Make not found images visible again
if(img.classList.contains("lazy")) {
img.classList.remove("element-not-found") img.classList.remove("element-not-found")
img.classList.add("element-found")
}
img.src = reader.result img.src = reader.result
} }
} }