File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,6 @@ export function preparePlatform() {
4949 console . log ( "Using Web platform" ) ;
5050 PlatformPeg . set ( new WebPlatform ( ) ) ;
5151 }
52- // Register service worker if available on this platform
53- PlatformPeg . get ( ) . registerServiceWorker ( ) ;
5452}
5553
5654export async function loadConfig ( ) {
Original file line number Diff line number Diff line change @@ -34,16 +34,18 @@ const POKE_RATE_MS = 10 * 60 * 1000; // 10 min
3434export default class WebPlatform extends VectorBasePlatform {
3535 private runningVersion : string = null ;
3636
37- getHumanReadableName ( ) : string {
38- return 'Web Platform' ; // no translation required: only used for analytics
39- }
40-
41- registerServiceWorker ( ) : void {
37+ constructor ( ) {
38+ super ( ) ;
39+ // Register service worker if available on this platform
4240 if ( 'serviceWorker' in navigator ) {
4341 navigator . serviceWorker . register ( 'sw.js' ) ;
4442 }
4543 }
4644
45+ getHumanReadableName ( ) : string {
46+ return 'Web Platform' ; // no translation required: only used for analytics
47+ }
48+
4749 /**
4850 * Returns true if the platform supports displaying
4951 * notifications, otherwise false.
You can’t perform that action at this time.
0 commit comments