Skip to content

Commit

Permalink
Warn on unexpected Rich Text page property (#2252)
Browse files Browse the repository at this point in the history
* Warn on unexpected Rich Text page property

* nit
  • Loading branch information
spolu authored Oct 25, 2023
1 parent 3aa384d commit 91ee9ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions connectors/src/connectors/notion/lib/notion_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,14 @@ function parsePropertyText(
? property.title.map((t) => t.plain_text).join(" ")
: null;
case "rich_text":
if (!Array.isArray(property.rich_text)) {
logger.warn(
{
property,
},
"Unexpected rich_text structure"
);
}
return property.rich_text.map((t) => t.plain_text).join(" ");
case "people":
return property.people.length > 0
Expand Down

0 comments on commit 91ee9ca

Please sign in to comment.