Skip to content

Commit

Permalink
Fix unexpected promises
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Nov 17, 2023
1 parent 27c589b commit 6bbaf5a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ function Breadcrumb({ breadcrumb, index, here }: BreadcrumbProps): JSX.Element {
name="item-name-small"
value={renameState && renameState[0] === breadcrumb.globalKey ? renameState[1] : breadcrumb.name}
onChange={(newName) => tentativelyRename(breadcrumb.globalKey, newName)}
onSave={(newName) => breadcrumb.onRename?.(newName)}
onSave={(newName) => {
void breadcrumb.onRename?.(newName)
}}
mode={renameState && renameState[0] === breadcrumb.globalKey ? 'edit' : 'view'}
onModeToggle={(newMode) => {
if (newMode === 'edit') {
Expand Down Expand Up @@ -182,7 +184,9 @@ function Here({ breadcrumb }: HereProps): JSX.Element {
name="item-name-large"
value={renameState && renameState[0] === breadcrumb.globalKey ? renameState[1] : breadcrumb.name}
onChange={(newName) => tentativelyRename(breadcrumb.globalKey, newName)}
onSave={(newName) => breadcrumb.onRename?.(newName)}
onSave={(newName) => {
void breadcrumb.onRename?.(newName)
}}
mode={renameState && renameState[0] === breadcrumb.globalKey ? 'edit' : 'view'}
onModeToggle={(newMode) => {
if (newMode === 'edit') {
Expand Down

0 comments on commit 6bbaf5a

Please sign in to comment.