only use electron api if available

This commit is contained in:
Markus Moser 2025-03-14 17:27:40 +01:00
parent 8d67d09a55
commit 5a1962ced2
No known key found for this signature in database
GPG key ID: AD411FF94FFE07BD

View file

@ -173,7 +173,9 @@ export default class PrivateModePlugin extends Plugin {
updateGlobalRevealStyle() {
this.removeAllClasses();
this.setClassToDocumentBody();
window.require("electron").remote.getCurrentWindow().setContentProtection(this.currentScreenshareProtection)
if (window.require !== undefined) {
window.require("electron").remote.getCurrentWindow().setContentProtection(this.currentScreenshareProtection)
}
}
removeAllClasses() {