From 5ffe9e4d273fd3c87134e70fcd8ff2c0b2d33775 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Mon, 1 Dec 2025 23:51:37 +0100 Subject: [PATCH] refactor: improve document preview type checking by replacing ts-ignore with explicit type checks. --- frontend/src/documents/hooks/useDocumentsNavigation.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/documents/hooks/useDocumentsNavigation.ts b/frontend/src/documents/hooks/useDocumentsNavigation.ts index ec28476..2a4a913 100644 --- a/frontend/src/documents/hooks/useDocumentsNavigation.ts +++ b/frontend/src/documents/hooks/useDocumentsNavigation.ts @@ -103,9 +103,7 @@ export const useDocumentsNavigation = ({ onFolderSelect?.(activeRow.id as string); } else { const entry = getEntryByKey(activeRow.key); - // @ts-ignore - if (entry?.document) { - // @ts-ignore + if (entry && entry.type === 'document') { onPreview?.(entry.document); } }