diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 35f0b347886f54e7dea3244fe3285ad3a264f02d..3a849a045b3fee47e1243db8d067f2e573fe2a06 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -17,8 +17,8 @@
     <meta name="mobile-web-app-capable" content="yes">
 	<meta name="theme-color" content="#d89000">
 	<script type="text/javascript">
-		var mxIsElectron = (window && window.process && window.process.type) || (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1);
-		var mxIsElectron5 = mxIsElectron && parseInt(process.versions.electron) >= 5;
+		var mxIsElectron = window && window.process && window.process.type;
+		var mxIsElectron5 = mxIsElectron && parseInt(window.process.versions.electron) >= 5;
 		var hostName = window.location.hostname;
 		// Supported domains are *.draw.io that draw.io host, or the packaged version in Quip
 		var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||