react-onesignal
react-onesignal copied to clipboard
Fix missing reject for init
When I init the oneSignal sdk with some invalid config, I get the following error:
try {
await OneSignal.init({ appId: "example app id" });
} catch(e) {
console.log("error with init")
}
Uncaught (in promise) Error: OneSignalSDK: HTTP sites are no longer supported starting with version 16 (User Model), your public site must start with https://. Please visit the OneSignal dashboard's Settings > Web Configuration to find this option.
This is an example error. The main issue is that the error is uncaught.
This PR will fix the uncaught exception
Thanks for opening the PR. I'll forward this to the team so they can review 🙏🏽