Skip to content

Commit

Permalink
fix: isJournalPageAdd match bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhiter committed Sep 27, 2024
1 parent c234ee7 commit 4f45814
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ async function main() {
const currentPage = await logseq.Editor.getPage(pageId, {
includeChildren: false,
})

if (
currentPage?.name === format(new Date(), preferredDateFormat) &&
currentPage?.name.replace(
/\b(monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b/gi,
(match) => match.charAt(0).toUpperCase() + match.slice(1).toLowerCase()
) === format(new Date(), preferredDateFormat) &&
!isJournalPageAdd
) {
return
Expand Down

0 comments on commit 4f45814

Please sign in to comment.