diff --git a/src/firebase.js b/src/firebase.js index f67412be9..83b1da00f 100644 --- a/src/firebase.js +++ b/src/firebase.js @@ -95,6 +95,10 @@ export const fetchToken = async () => { } else { console.log('Failed to retrieve token. Trying to re-register service worker.'); const newToken = await reRegisterServiceWorkerAndGetToken(); // Re-register service worker and fetch token + if (newToken ===null) { + console.log('FCM Token null case'); + return fetchToken(); + } if (newToken) { return newToken; } else {