Skip to content

Commit 8023b6a

Browse files
committed
More defensive retrieval of name to address blank rows
1 parent b3ade7d commit 8023b6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const loadData = async ({ notion }) => {
88
const processRows = (data) => {
99
const parent = {}
1010
data.results.forEach((row) => {
11-
const name = row.properties.Name.title[0].plain_text.toLowerCase()
11+
const name = row.properties.Name?.title[0]?.plain_text?.toLowerCase()
1212
if (name) parent[name] = row.id
1313
})
1414
return parent

0 commit comments

Comments
 (0)