Skip to content

Commit

Permalink
fix: 🐛 errors caused by no summary
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenull committed Mar 17, 2022
1 parent 2aeb11b commit 53f042f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const App: React.FC<{ env: string }> = ({ env }) => {
const page = await logseq.Editor.getPage(pageId)
pageName = page?.originalName
}
const { blockUuid } = await logseq.Editor.getBlock(rawData.id) || { blockUuid: undefined }
const { uuid: blockUuid } = await logseq.Editor.getBlock(rawData.id) || { uuid: '' }
logseq.Editor.scrollToBlockInPage(pageName, blockUuid)
logseq.hideMainUI()
}, { once: true })
Expand Down
2 changes: 1 addition & 1 deletion src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export const getSubCalendarSchedules = async (subscriptionCalendarList: ISetting
const { dtstart, dtend, summary, description } = event
const hasTime = dtstart.type === 'date-time'
return genSchedule({
blockData: { id: new Date().valueOf(), content: `${summary.value}\n${description?.value || ''}`, subscription: true },
blockData: { id: new Date().valueOf(), content: `${summary?.value || 'no summary'}\n${description?.value || ''}`, subscription: true },
category: hasTime ? 'time' : 'allday',
start: dtstart.value,
end: dtend ? (hasTime ? dtend?.value : formatISO(parseISO(dtend?.value))) : undefined,
Expand Down

0 comments on commit 53f042f

Please sign in to comment.