From ccf282b2d4a44fc596369aa4784d7417acc173da Mon Sep 17 00:00:00 2001 From: Devin Binnie Date: Mon, 20 Nov 2023 11:52:53 -0500 Subject: [PATCH] More feedback --- src/main/preload/externalAPI.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/preload/externalAPI.ts b/src/main/preload/externalAPI.ts index 3f8d79d0b5a..d9571474927 100644 --- a/src/main/preload/externalAPI.ts +++ b/src/main/preload/externalAPI.ts @@ -40,7 +40,7 @@ import { LEGACY_OFF, } from 'common/communication'; -contextBridge.exposeInMainWorld('desktopAPI', { +const desktopAPI: DesktopAPI = { // Initialization isDev: () => ipcRenderer.invoke(GET_IS_DEV_MODE), @@ -91,7 +91,8 @@ contextBridge.exposeInMainWorld('desktopAPI', { // Utility unregister: (channel) => ipcRenderer.removeAllListeners(channel), -} as DesktopAPI); +}; +contextBridge.exposeInMainWorld('desktopAPI', desktopAPI); // Specific info for the testing environment if (process.env.NODE_ENV === 'test') {