Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

common: fix type error

Abdullah Atta799678efca80
diff --git a/packages/common/src/components/resolved-item.tsx b/packages/common/src/components/resolved-item.tsx
index 876e40e14..b6e3d57bf 100644
--- a/packages/common/src/components/resolved-item.tsx
+++ b/packages/common/src/components/resolved-item.tsx
@@ -34,6 +34,6 @@ export function ResolvedItem<TItemType extends ItemType>(
props: ResolvedItemProps<TItemType>
) {
const { children } = props;
- const result = useResolvedItem(props);
- return result ? <>{children(result)}</> : null;
+ const { item, data } = useResolvedItem(props) || {};
+ return item ? <>{children({ item, data })}</> : null;
}