wix / react-native-notifications

React Native Notifications
MIT License
3.25k stars 764 forks source link

FIX #835: null mNotification #862

Closed DanielEliraz closed 2 years ago

DanielEliraz commented 2 years ago

In order to fix #835 we changed the clear operation to occur after the arguments' extraction. also changed deprecated hasActiveCatalystInstance to hasActiveReactInstance

uzegonemad commented 2 years ago

@DanielEliraz FYI this change causes compilation to fail when used in RN < 0.65.0 because hasActiveReactInstance() didn't exist before then. If possible, I'd suggest using a try/catch to fallback to the old method name for those who aren't able to upgrade to 0.65+ yet. Alternatively, noting that this requires RN >= 0.65.0 might be useful.