From d730cf7b711987e7fed22a423ec204b7af2e55db Mon Sep 17 00:00:00 2001 From: Quang Lam Date: Thu, 26 Mar 2020 19:16:29 +0700 Subject: [PATCH] Fix random object has been destroyed bug when removing workspace (#169) --- public/libs/views.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/libs/views.js b/public/libs/views.js index f5678d99..319b37c4 100644 --- a/public/libs/views.js +++ b/public/libs/views.js @@ -404,7 +404,11 @@ const addView = (browserWindow, workspace) => { // Link preview view.webContents.on('update-target-url', (e, url) => { - view.webContents.send('update-target-url', url); + try { + view.webContents.send('update-target-url', url); + } catch (err) { + console.log(err); // eslint-disable-line no-console + } }); // Handle audio & notification preferences