Skip to content

Commit

Permalink
fix: Migration error
Browse files Browse the repository at this point in the history
  • Loading branch information
brunojm committed Jul 5, 2023
1 parent a3e69b0 commit 6b60c3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ function checkAndMigrateBooksIDsMap() {
// check booksIDsMap format and migrate old format
console.log("Readwise Official plugin: checking booksIDsMap format")
if (logseq.settings!.booksIDsMap) {
const booksIDsMap = logseq.settings!.booksIDsMap
const newBooksIDsMap = logseq.settings!.newBooksIDsMap
const booksIDsMap = logseq.settings!.booksIDsMap || {}
const newBooksIDsMap = logseq.settings!.newBooksIDsMap || {}
let isOldFormat = false
if (Object.keys(booksIDsMap).length < Object.keys(newBooksIDsMap).length) {
isOldFormat = true
Expand Down

0 comments on commit 6b60c3e

Please sign in to comment.