Skip to content

Commit

Permalink
fix: Missing page updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brunojm committed Aug 8, 2022
1 parent 9ad86b5 commit 389e1b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ async function downloadArchive(exportID: number, setNotification?, setIsSyncing?
}
}
const readwisePage = await logseq.Editor.getPage(parentPageName)
if (readwisePage === null) {
await logseq.Editor.createPage(parentPageName, {'title': parentPageName}, {
createFirstBlock: false,
redirect: false
})
}
if (readwisePage && responseJSON.syncNotification) {
console.log(`Updating ${parentPageName} page with sync notification`)
await updatePage(readwisePage, convertReadwiseToIBatchBlock(
Expand Down

0 comments on commit 389e1b3

Please sign in to comment.