refactor
This commit is contained in:
@@ -76,9 +76,9 @@ export const useWorkspaceSelection = ({
|
||||
|
||||
const selectEntry = useCallback(
|
||||
(entry: SelectionEntry | string | null, event?: unknown) => {
|
||||
const rowKey = typeof entry === 'string'
|
||||
? entry
|
||||
: entry?.rowKey ?? null;
|
||||
const rowKey = entry && Object(entry) === entry
|
||||
? (entry as SelectionEntry).rowKey ?? null
|
||||
: (entry as string | null);
|
||||
if (!rowKey) return;
|
||||
handleEntrySelection(rowKey, event);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user