mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
avoid app crash when profile of a new item is opened
This commit is contained in:
parent
ed4cdce37c
commit
582258ea90
@ -10,7 +10,7 @@ interface Props {
|
||||
export const RelationsView = ({ item, relation }: Props) => {
|
||||
const items = useItems()
|
||||
|
||||
if (!item.relations) throw new Error('Item does not have relations defined.')
|
||||
if (!item.relations) return
|
||||
|
||||
const relationsOfRightType = item.relations.filter((r) => r.type === relation)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user