From 09ba7bcf9c695a23b1d2bdf848fabc14a9f8e4fb Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 11 Apr 2020 20:11:56 +0200 Subject: [PATCH] Update DiscordPreview.js --- Plugins/ThemeRepo/res/DiscordPreview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/ThemeRepo/res/DiscordPreview.js b/Plugins/ThemeRepo/res/DiscordPreview.js index ae16ba1aed..e11916b070 100644 --- a/Plugins/ThemeRepo/res/DiscordPreview.js +++ b/Plugins/ThemeRepo/res/DiscordPreview.js @@ -71,7 +71,7 @@ document.body.firstElementChild.style.removeProperty("display"); let electron = require("electron"); - if (electron) { + if (electron && electron.remote) { let browserWindow = electron.remote.getCurrentWindow(); if (browserWindow) document.addEventListener("click", event => { let button = getParent(dotCNC.titlebarmacbutton + dotCN.titlebarwinbutton, event.target);