Fix production TypeScript errors blocking dashboard build
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
dc1d6e585d
commit
791580b850
@@ -127,10 +127,11 @@ export default function BlogCategoriesPage() {
|
||||
}, [categories]);
|
||||
|
||||
const parentOptions = useMemo(() => {
|
||||
const source = !draft?.id
|
||||
const draftId = draft?.id;
|
||||
const source = !draftId
|
||||
? categories
|
||||
: categories.filter(
|
||||
(item) => !collectDescendantIds(draft.id, categories).has(item.id),
|
||||
(item) => !collectDescendantIds(draftId, categories).has(item.id),
|
||||
);
|
||||
return toTreeSelect(source);
|
||||
}, [categories, draft?.id]);
|
||||
|
||||
Reference in New Issue
Block a user