this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix getNotifications is not a function

+11 -9
+11 -9
src/pages/notifications.jsx
··· 206 206 useEffect(() => { 207 207 if (uiState === 'default') { 208 208 (async () => { 209 - const registration = await getRegistration(); 210 - if (registration) { 211 - const notifications = await registration.getNotifications(); 212 - console.log('🔔 Push notifications', notifications); 213 - // Close all notifications? 214 - // notifications.forEach((notification) => { 215 - // notification.close(); 216 - // }); 217 - } 209 + try { 210 + const registration = await getRegistration(); 211 + if (registration?.getNotifications) { 212 + const notifications = await registration.getNotifications(); 213 + console.log('🔔 Push notifications', notifications); 214 + // Close all notifications? 215 + // notifications.forEach((notification) => { 216 + // notification.close(); 217 + // }); 218 + } 219 + } catch (e) {} 218 220 })(); 219 221 } 220 222 }, [uiState]);