use new global to check for electron
This commit is contained in:
parent
382a5dc5c0
commit
cf255756ae
|
@ -25,7 +25,7 @@ weechat.factory('notifications', ['$rootScope', '$log', 'models', 'settings', fu
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for serviceWorker support, and also disable serviceWorker if we're running in electron process, since that's just problematic and not necessary, since gb then already is in a separate process
|
// Check for serviceWorker support, and also disable serviceWorker if we're running in electron process, since that's just problematic and not necessary, since gb then already is in a separate process
|
||||||
if ('serviceWorker' in navigator && (typeof window !== 'undefined' && window.process && window.process.type === "renderer")) {
|
if ('serviceWorker' in navigator && window.is_electron !== 1) {
|
||||||
$log.info('Service Worker is supported');
|
$log.info('Service Worker is supported');
|
||||||
navigator.serviceWorker.register('serviceworker.js').then(function(reg) {
|
navigator.serviceWorker.register('serviceworker.js').then(function(reg) {
|
||||||
$log.info('Service Worker install:', reg);
|
$log.info('Service Worker install:', reg);
|
||||||
|
|
Loading…
Reference in New Issue