refactor: improve document preview type checking by replacing ts-ignore with explicit type checks.

This commit is contained in:
2025-12-01 23:51:37 +01:00
parent 601ced5981
commit 5ffe9e4d27
@@ -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);
}
}