Skip to content

Commit 9b757ad

Browse files
committed
Fix eslint errors
1 parent 893218d commit 9b757ad

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/notion/src/data.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,6 @@ export function getFieldDataEntryForProperty(
572572
case "formula": {
573573
const formula = property.formula
574574

575-
if (!formula) return null
576-
577575
let value = null
578576
switch (formula.type) {
579577
case "string":
@@ -596,6 +594,8 @@ export function getFieldDataEntryForProperty(
596594
case "string":
597595
case "color":
598596
case "link":
597+
if (typeof value === "object") return null
598+
599599
return {
600600
type: field.type,
601601
value: String(value),
@@ -610,7 +610,7 @@ export function getFieldDataEntryForProperty(
610610
}
611611
}
612612
case "date": {
613-
if (formula.type !== "date" || !formula.date || !formula.date.start) return null
613+
if (formula.type !== "date" || !formula.date?.start) return null
614614

615615
const date = new Date(formula.date.start)
616616

0 commit comments

Comments
 (0)