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);
|
onFolderSelect?.(activeRow.id as string);
|
||||||
} else {
|
} else {
|
||||||
const entry = getEntryByKey(activeRow.key);
|
const entry = getEntryByKey(activeRow.key);
|
||||||
// @ts-ignore
|
if (entry && entry.type === 'document') {
|
||||||
if (entry?.document) {
|
|
||||||
// @ts-ignore
|
|
||||||
onPreview?.(entry.document);
|
onPreview?.(entry.document);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user