Update DiscordPreview.js

This commit is contained in:
Mirco Wittrien 2020-04-11 20:11:56 +02:00
parent d757795e10
commit 09ba7bcf9c
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@
document.body.firstElementChild.style.removeProperty("display"); document.body.firstElementChild.style.removeProperty("display");
let electron = require("electron"); let electron = require("electron");
if (electron) { if (electron && electron.remote) {
let browserWindow = electron.remote.getCurrentWindow(); let browserWindow = electron.remote.getCurrentWindow();
if (browserWindow) document.addEventListener("click", event => { if (browserWindow) document.addEventListener("click", event => {
let button = getParent(dotCNC.titlebarmacbutton + dotCN.titlebarwinbutton, event.target); let button = getParent(dotCNC.titlebarmacbutton + dotCN.titlebarwinbutton, event.target);