refactor: improve document preview type checking by replacing ts-ignore with explicit type checks.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user