mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ Handle rich_text when simplifying data on Notion Node (#2128)
This commit is contained in:
parent
5286ccb16c
commit
31da7a7bd8
|
@ -376,6 +376,9 @@ export function simplifyProperties(properties: any) {
|
||||||
if (['text'].includes(properties[key].type)) {
|
if (['text'].includes(properties[key].type)) {
|
||||||
const texts = properties[key].text.map((e: { plain_text: string }) => e.plain_text || {}).join('');
|
const texts = properties[key].text.map((e: { plain_text: string }) => e.plain_text || {}).join('');
|
||||||
results[`${key}`] = texts;
|
results[`${key}`] = texts;
|
||||||
|
} else if (['rich_text'].includes(properties[key].type)) {
|
||||||
|
const texts = properties[key].rich_text.map((e: { plain_text: string }) => e.plain_text || {}).join('');
|
||||||
|
results[`${key}`] = texts;
|
||||||
} else if (['url', 'created_time', 'checkbox', 'number', 'last_edited_time', 'email', 'phone_number', 'date'].includes(properties[key].type)) {
|
} else if (['url', 'created_time', 'checkbox', 'number', 'last_edited_time', 'email', 'phone_number', 'date'].includes(properties[key].type)) {
|
||||||
// tslint:disable-next-line: no-any
|
// tslint:disable-next-line: no-any
|
||||||
results[`${key}`] = properties[key][type] as any;
|
results[`${key}`] = properties[key][type] as any;
|
||||||
|
|
Loading…
Reference in a new issue