Check userAgent before running electron init

This commit is contained in:
Martin Fournier 2022-01-03 10:33:58 -05:00
parent 6d8df6744e
commit 6c3618cb65

@ -417,10 +417,14 @@ function calculateAchievements(): void {
}
export function initElectron(): void {
setAchievements([]);
initWebserver();
setInterval(calculateAchievements, 5000);
initAppNotifier();
const userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf(' electron/') > -1) {
// Electron-specific code
setAchievements([]);
initWebserver();
setInterval(calculateAchievements, 5000);
initAppNotifier();
}
}
function initWebserver(): void {