Skip to content

Commit 0679843

Browse files
authored
fix: check body to be undefined (#31)
In case body is undefined, replace with empty text Co-authored-by: Sebastian Holmqvist <csholmq@users.noreply.github.com>
1 parent 1833d36 commit 0679843

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/notion.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/notion.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/notion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const notionApi = async (apiKey: string, database_id: string) => {
3333
},
3434
body: {
3535
rich_text: [
36-
{ text: { content: body }, type: 'text' }
36+
{ text: { content: (body != undefined) ? body : '' }, type: 'text' }
3737
],
3838
type: 'rich_text'
3939
}
@@ -97,7 +97,7 @@ const notionApi = async (apiKey: string, database_id: string) => {
9797
},
9898
body: {
9999
rich_text: [
100-
{ text: { content: body }, type: 'text' }
100+
{ text: { content: (body != undefined) ? body : '' }, type: 'text' }
101101
],
102102
type: 'rich_text'
103103
}

0 commit comments

Comments
 (0)