mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
fix(react/dialogs): some type errors
This commit is contained in:
@@ -20,6 +20,7 @@ function ConfirmDialogComponent({ title, message, callback, lastElementToFocus,
|
||||
|
||||
return (
|
||||
<Modal
|
||||
className="confirm-dialog"
|
||||
title={title ?? t("confirm.confirmation")}
|
||||
size="md"
|
||||
zIndex={2000}
|
||||
@@ -93,7 +94,7 @@ export default class ConfirmDialog extends ReactBasicWidget {
|
||||
|
||||
private showDialog(title: string | null, message: MessageType, callback: ConfirmDialogCallback, isConfirmDeleteNoteBox: boolean) {
|
||||
this.props = {
|
||||
title: title,
|
||||
title: title ?? undefined,
|
||||
message: (typeof message === "object" && "length" in message ? message[0] : message),
|
||||
lastElementToFocus: (document.activeElement as HTMLElement),
|
||||
callback,
|
||||
|
||||
Reference in New Issue
Block a user