Fix error when collection is null in collection notification (#38831)
This commit is contained in:
1 parent
ffd7160980
commit
31f89617d8
3 files changed
+9
-4
No files matched your search
+6
-1
@@ -24,9 +24,14 @@ export const NotificationCollection: React.FC<{
|
||||
unread: boolean;
|
||||
}> = ({ notification, unread }) => {
|
||||
const { collection, type } = notification;
|
||||
const collectionCreatorAccount = useAccount(collection.account_id);
|
||||
|
||||
const collectionCreatorAccount = useAccount(collection?.account_id);
|
||||
const confirmRevoke = useConfirmRevoke(collection);
|
||||
|
||||
if (!collection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
|
||||
Reference in new issue
Block a user