Skip to content

Commit 31c0698

Browse files
authored
Merge pull request NotionX#388 from NotionX/card-to-property-link
fixed bug where linproperties could be null
2 parents 58f2e53 + 61b2e51 commit 31c0698

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-notion-x/src/third-party/collection-card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export const CollectionCard: React.FC<CollectionCardProps> = ({
125125
p.visible && p.property !== 'title' && collection.schema[p.property]
126126
)
127127
.filter((p) => {
128-
if (!block.properties) return null
128+
if (!block.properties) return false
129129
const schema = collection.schema[p.property]
130130

131131
return schema.type == 'url'
@@ -136,6 +136,7 @@ export const CollectionCard: React.FC<CollectionCardProps> = ({
136136
}
137137
let url = null
138138
if (
139+
linkProperties &&
139140
linkProperties.length > 0 &&
140141
linkProperties[0].length > 0 &&
141142
linkProperties[0][0].length > 0

0 commit comments

Comments
 (0)