mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
🐛 Fix(custom): avoid undefined error
This commit is contained in:
@@ -106,7 +106,7 @@ class RemoteNoticeHandler {
|
||||
switch (action.type) {
|
||||
case IRemoteNoticeActionType.SHOW_DIALOG: {
|
||||
const currentWindow = windowManager.getAvailableWindow()
|
||||
dialog.showOpenDialog(currentWindow, action.data?.options)
|
||||
dialog.showOpenDialog(currentWindow!, action.data?.options)
|
||||
break
|
||||
}
|
||||
case IRemoteNoticeActionType.SHOW_NOTICE:
|
||||
@@ -138,7 +138,7 @@ class RemoteNoticeHandler {
|
||||
case IRemoteNoticeActionType.SHOW_MESSAGE_BOX: {
|
||||
const currentWindow = windowManager.getAvailableWindow()
|
||||
dialog
|
||||
.showMessageBox(currentWindow, {
|
||||
.showMessageBox(currentWindow!, {
|
||||
title: action.data?.title || '',
|
||||
message: action.data?.content || '',
|
||||
type: 'info',
|
||||
|
||||
@@ -124,7 +124,7 @@ router.post(
|
||||
}
|
||||
})
|
||||
const win = windowManager.getAvailableWindow()
|
||||
const result = await uploadChoosedFiles(win.webContents, pathList)
|
||||
const result = await uploadChoosedFiles(win?.webContents, pathList)
|
||||
const res = result.map(item => {
|
||||
return useShortUrl ? item.fullResult.shortUrl || item.url : item.url
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user