mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
fix message
This commit is contained in:
-20
@@ -34,26 +34,6 @@ if (environment.production) {
|
||||
SentrySibling.init
|
||||
); */
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/firebase-messaging-sw.js')
|
||||
.then(registration => {
|
||||
console.log('Service Worker registrado com sucesso:', registration);
|
||||
|
||||
|
||||
// Send data to the service worker
|
||||
if (registration.active) {
|
||||
registration.active.postMessage({ type: 'INIT_WEBSOCKET', url: 'wss://example.com/socket' });
|
||||
} else {
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.active.postMessage({ type: 'INIT_WEBSOCKET', url: 'wss://example.com/socket' });
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Erro ao registrar o Service Worker:', error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
|
||||
Reference in New Issue
Block a user