Skip to content

Commit c847bb7

Browse files
authored
Notion 'Retrieve Block' summary fix (#16325)
1 parent 435555b commit c847bb7

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

components/notion/actions/retrieve-block/retrieve-block.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "notion-retrieve-block",
55
name: "Retrieve Page Content",
66
description: "Get page content as block objects or markdown. Blocks can be text, lists, media, a page, among others. [See the documentation](https://developers.notion.com/reference/retrieve-a-block)",
7-
version: "0.2.0",
7+
version: "0.2.1",
88
type: "action",
99
props: {
1010
notion,
@@ -42,14 +42,15 @@ export default {
4242
const subpagesOnly = retrieveChildren === "Sub-Pages Only";
4343

4444
const block = await this.notion.retrieveBlock(this.blockId);
45-
if ([
45+
const shouldRetrieveChildren = [
4646
true,
4747
"All Children",
4848
"Sub-Pages Only",
49-
].includes(retrieveChildren)) {
49+
].includes(retrieveChildren);
50+
if (shouldRetrieveChildren) {
5051
block.children = await this.notion.retrieveBlockChildren(block, subpagesOnly);
5152
}
52-
$.export("$summary", `Successfully retrieved block${retrieveChildren
53+
$.export("$summary", `Successfully retrieved block${shouldRetrieveChildren
5354
? ` with ${block.children.length ?? 0} ${subpagesOnly
5455
? "sub-pages"
5556
: "children"}`

components/notion/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/notion",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Pipedream Notion Components",
55
"main": "notion.app.mjs",
66
"keywords": [

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)