[Desktop] Fix invalid type assertion in API (#2631)

This commit is contained in:
filtered
2025-02-19 21:59:17 +11:00
committed by GitHub
parent e4444d4074
commit 0d6bc669f5
3 changed files with 7 additions and 10 deletions

View File

@@ -1,7 +1,4 @@
import {
ElectronAPI,
ElectronContextMenuOptions
} from '@comfyorg/comfyui-electron-types'
import { ElectronAPI } from '@comfyorg/comfyui-electron-types'
export function isElectron() {
return 'electronAPI' in window && window.electronAPI !== undefined
@@ -11,8 +8,8 @@ export function electronAPI() {
return (window as any).electronAPI as ElectronAPI
}
export function showNativeMenu(event: MouseEvent) {
electronAPI()?.showContextMenu(event as ElectronContextMenuOptions)
export function showNativeSystemMenu() {
electronAPI()?.showContextMenu()
}
export function isNativeWindow() {