diff --git a/frontend/src/views/files/Preview.vue b/frontend/src/views/files/Preview.vue index d5f772a5..69cbc489 100644 --- a/frontend/src/views/files/Preview.vue +++ b/frontend/src/views/files/Preview.vue @@ -301,10 +301,8 @@ watch(route, () => { // Specify hooks onMounted(async () => { window.addEventListener("keydown", key); - if (fileStore.oldReq) { - listing.value = fileStore.oldReq.items; - updatePreview(); - } + listing.value = fileStore.oldReq?.items ?? null; + updatePreview(); }); onBeforeUnmount(() => window.removeEventListener("keydown", key));