fix: explicitly assign a value to `cancelId` for ‘Clear All Data' dialog (#1624)
This commit is contained in:
parent
9ec3fe562b
commit
fdb87cf5cd
|
|
@ -7,6 +7,7 @@ import { promisify } from "node:util"
|
|||
import { callWindowExpose } from "@follow/shared/bridge"
|
||||
import { app, dialog } from "electron"
|
||||
|
||||
import { getIconPath } from "~/helper"
|
||||
import { logger } from "~/logger"
|
||||
import { getMainWindow } from "~/window"
|
||||
|
||||
|
|
@ -23,9 +24,10 @@ export const clearAllDataAndConfirm = async () => {
|
|||
// Dialog to confirm
|
||||
const result = await dialog.showMessageBox({
|
||||
type: "warning",
|
||||
|
||||
icon: getIconPath(),
|
||||
message: t("dialog.clearAllData"),
|
||||
buttons: [t("dialog.yes"), t("dialog.no")],
|
||||
cancelId: 1,
|
||||
})
|
||||
|
||||
if (result.response === 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue