chore: fix file preview modal vault selection
This commit is contained in:
@@ -24,8 +24,9 @@ export class FilePreviewModalController {
|
|||||||
if (!this.currentFile) {
|
if (!this.currentFile) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (changed.includes(this.currentFile)) {
|
const changedCurrentFile = changed.find((f) => f.uuid === this.currentFile?.uuid) as FileItem | undefined
|
||||||
this.setCurrentFile(this.currentFile)
|
if (changedCurrentFile) {
|
||||||
|
this.setCurrentFile(changedCurrentFile)
|
||||||
}
|
}
|
||||||
if (removed.find((f) => f.uuid === this.currentFile?.uuid)) {
|
if (removed.find((f) => f.uuid === this.currentFile?.uuid)) {
|
||||||
if (!this.otherFiles.length) {
|
if (!this.otherFiles.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user