Left-on-Read / leftonread

Left on Read
https://leftonread.me/
Other
166 stars 16 forks source link

fix: window destroyed exceptions #450

Closed amilajack closed 1 year ago

amilajack commented 1 year ago

fixes the following error

Uncaught Exception:
TypeError: Object has been destroyed at EventEmitter.send (node:electron/is2c/ browser_init:161:2484)
at p. ‹anonymous> (/Applications/Left on Read.app/Contents/Resources/app.asar/ dist/main/webpack:/src/main/ main.ts:86:22)
at p.emit (node:events:402:35)
at p.dispatchUpdateDownloaded (/ Applications/Left on Read.app/Contents/ Resources/app.asar/dist/main/webpack:/ node_modules/electron-updater/out/ AppUpdater.js:390:14)
at Server.<anonymous> (/Applications/ Left on Read.app/Contents/Resources/

which is caused by referencing the BrowserWindow sender's webcontents. this change ignores listen-for-updates events from rendered that have been closed.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
leftonread-web ✅ Ready (Inspect) Visit Preview Nov 3, 2022 at 6:14PM (UTC)
alexdanilowicz commented 1 year ago

Incredible! Thank you!