Skip to content

Commit

Permalink
fix: undefined at the end of table
Browse files Browse the repository at this point in the history
  • Loading branch information
souvikinator committed Jul 15, 2023
1 parent 9deb420 commit 37ec581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/notion-to-md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class NotionToMarkdown {
] += `\n${childPageTitle}\n${mdstr[childPageTitle]}`;
}
}
} else if (mdBlocks.type === "toggle" || mdBlocks.type === "table") {
} else if (mdBlocks.type === "toggle") {
// convert children md object to md string
const toggle_children_md_string = this.toMarkdownString(
mdBlocks.children
Expand All @@ -145,7 +145,7 @@ export class NotionToMarkdown {
mdOutput[pageIdentifier] = mdOutput[pageIdentifier] || "";
if (pageIdentifier !== "parent" && mdstr["parent"]) {
mdOutput[pageIdentifier] += mdstr["parent"];
} else {
} else if (mdstr[pageIdentifier]) {
mdOutput[pageIdentifier] += mdstr[pageIdentifier];
}
}
Expand Down

0 comments on commit 37ec581

Please sign in to comment.