You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example process for exposing the ipcRenderer does not handle non-enumerable properties, leading to window.ipcRenderer.invoke being undefined outside of preload.ts.
The problem is the use of Object.entries to determine properties to expose here
The example process for exposing the ipcRenderer does not handle non-enumerable properties, leading to
window.ipcRenderer.invoke
being undefined outside ofpreload.ts
.The problem is the use of
Object.entries
to determine properties to expose herecreate-electron-vite/electron/preload.ts
Lines 8 to 11 in a9e13ae
I suggest replacing
Object.entries
withObject.getOwnPropertyNames
to address this.Although, arguably, the base code shouldn't be exposing the ipcRenderer like this, as per the security considerations note in
https://www.electronjs.org/docs/latest/tutorial/ipc
The text was updated successfully, but these errors were encountered: