File tree 1 file changed +8
-12
lines changed
1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,14 @@ declare global {
18
18
function initServiceWorker ( ) {
19
19
if ( "serviceWorker" in navigator ) {
20
20
window . addEventListener ( "load" , ( ) => {
21
- navigator . serviceWorker
22
- // TODO: We'll need some bundler to get access to env vars here...
23
- // Hardcoding the review branch for testing purposes for now.
24
- . register ( "service-worker/sw.js" , { scope : "/" } )
25
- . then (
26
- function ( _registration ) {
27
- console . log ( "Simulator ServiceWorker registration successful" ) ;
28
- } ,
29
- function ( err ) {
30
- console . log ( "Simulator ServiceWorker registration failed: " , err ) ;
31
- }
32
- ) ;
21
+ navigator . serviceWorker . register ( "/sw.js" , { scope : "/" } ) . then (
22
+ function ( _registration ) {
23
+ console . log ( "Simulator ServiceWorker registration successful" ) ;
24
+ } ,
25
+ function ( err ) {
26
+ console . log ( "Simulator ServiceWorker registration failed: " , err ) ;
27
+ }
28
+ ) ;
33
29
} ) ;
34
30
}
35
31
}
You can’t perform that action at this time.
0 commit comments