In some cases, react-navigation's getRootState() can return undefined, as documented here and here. This was being passed to getActiveRouteProps(), causing it to throw: Cannot read property 'routes' of undefined
Test Plan
We applied this change as a patch in our app first, and confirmed it removes the error and successfully sends events. I also added some unit tests for this behaviour here.
Checklist
[x] Detox tests pass
They failed to builld for me. I don't expect my changes to affect any of those tests though.
[x] If this is a bugfix/feature, the changelog has been updated
Description
Fixes #366
In some cases, react-navigation's
getRootState()
can returnundefined
, as documented here and here. This was being passed togetActiveRouteProps()
, causing it to throw:Cannot read property 'routes' of undefined
Test Plan
We applied this change as a patch in our app first, and confirmed it removes the error and successfully sends events. I also added some unit tests for this behaviour here.
Checklist