mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-23 18:59:14 -06:00
fix: type issue in notion integration (#5385)
This commit is contained in:
committed by
GitHub
parent
b685032b34
commit
cdf526e130
@@ -25,6 +25,8 @@ export const TYPE_MAPPING = {
|
||||
[TSurveyQuestionTypeEnum.Address]: ["rich_text"],
|
||||
[TSurveyQuestionTypeEnum.Matrix]: ["rich_text"],
|
||||
[TSurveyQuestionTypeEnum.Cal]: ["checkbox"],
|
||||
[TSurveyQuestionTypeEnum.ContactInfo]: ["rich_text"],
|
||||
[TSurveyQuestionTypeEnum.Ranking]: ["rich_text"],
|
||||
};
|
||||
|
||||
export const UNSUPPORTED_TYPES_BY_NOTION = [
|
||||
|
||||
@@ -392,6 +392,19 @@ const getValue = (colType: string, value: string | string[] | Date | number | Re
|
||||
},
|
||||
];
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
const content = value.join("\n");
|
||||
return [
|
||||
{
|
||||
text: {
|
||||
content:
|
||||
content.length > NOTION_RICH_TEXT_LIMIT
|
||||
? truncateText(content, NOTION_RICH_TEXT_LIMIT)
|
||||
: content,
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
return [
|
||||
{
|
||||
text: {
|
||||
|
||||
Reference in New Issue
Block a user