File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -8,25 +8,19 @@ const VERSION = 1;
88
99 const LOG_PREFIX = '[Notification] - ' ;
1010
11- if ( ! 'ServiceWorker' in self ) {
11+ if ( ! ( 'ServiceWorker' in self ) ) {
1212 console . error ( LOG_PREFIX + "this browser does not support the 'Service Worker API' in the current context" ) ;
1313
1414 return ;
1515 }
1616
17- if ( ! 'Navigator' in self ) {
17+ if ( ! ( 'Navigator' in self ) ) {
1818 console . error ( LOG_PREFIX + "this browser does not support the 'Navigator API' in the current context" ) ;
1919
2020 return ;
2121 }
2222
23- if ( ! navigator . serviceWorker ) {
24- console . error ( LOG_PREFIX + "this browser does not support the 'Service Worker API' in the current context" ) ;
25-
26- return ;
27- }
28-
29- if ( ! 'Notification' in self ) {
23+ if ( ! ( 'Notification' in self ) ) {
3024 console . error ( LOG_PREFIX + "this browser does not support the 'Notification API' in the current context" ) ;
3125
3226 return ;
@@ -44,7 +38,7 @@ const VERSION = 1;
4438 super ( icinga ) ;
4539
4640 // only allow to be instantiated in a web context
47- if ( ! self instanceof Window ) {
41+ if ( ! ( self instanceof Window ) ) {
4842 this . logger . error ( LOG_PREFIX + "module should not get loaded outside of a web context!" ) ;
4943 throw new Error ( "Attempted to initialize the 'Notification' module outside of a web context!" ) ;
5044 }
You can’t perform that action at this time.
0 commit comments