Try this snippet to fix your firebase push notification error on Safari on iOS/Mac OS. This will prevent blank page on your react.js app.
As Push API doesn’t support on Safari, so your firebase push notification (FCM) config will fail and will return an error or blank page especially on React.js app.
To fix that we can check if notifications are supported or not and if not then we will try to fake messaging object.
Check the below snippet and change your code accordingly.