Skip to content

Commit

Permalink
Fix selected preview resetted on remove any file
Browse files Browse the repository at this point in the history
Should only reset if remove selected preview file
  • Loading branch information
pkong-ds committed Aug 27, 2024
1 parent c134277 commit 9fda97d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/scripts/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ class FileListViewModel {
return !(isSameFilename && isSameULID);
});

window.viewModel.selectedPreviewImageULID =
window.viewModel.defaultImageUploadULID;
if (viewModel.selectedPreviewImageULID === fileUlid) {
viewModel.selectedPreviewImageULID = viewModel.defaultImageUploadULID;
}
}

updateImageUploadStateByULID(ulid, state) {
Expand Down

0 comments on commit 9fda97d

Please sign in to comment.