mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 12:10:11 +00:00
[Desktop] Fix invalid type assertion in API (#2631)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user