Skip to content

Commit

Permalink
fix: New notebook from popover (#17494)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite authored Sep 18, 2023
1 parent 45c82dc commit c9c4d9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@ export function NotebookSelectList(props: NotebookSelectProps): JSX.Element {
const openNewNotebook = (): void => {
const title = newNotebookTitle ?? `Notes ${dayjs().format('DD/MM')}`

if (resource) {
createNotebook(title, NotebookTarget.Popover, [resource], (theNotebookLogic) => {
props.onNotebookOpened?.(theNotebookLogic)
loadNotebooksContainingResource()
})
}
createNotebook(title, NotebookTarget.Popover, resource ? [resource] : undefined, (theNotebookLogic) => {
props.onNotebookOpened?.(theNotebookLogic)
loadNotebooksContainingResource()
})

setShowPopover(false)
}
Expand Down

0 comments on commit c9c4d9a

Please sign in to comment.