expo / ex-navigation

Route-centric navigation for React Native
997 stars 201 forks source link

crash if route while transitioning #180

Open adbl opened 7 years ago

adbl commented 7 years ago

We have some thumbnails and when pressed a Modal route is pushed showing the image in "fullscreen". it transitions from transparent to black. It fades out the same way when the fullscreen image is tapped again. If, while the scene is fading out, the thumbnail is pressed again there is a crash:

Cannot read property 'scene' of null

in Object._onTransitionStart (ExNavigationStack)

This may accidentally happen. What would be a good solution? It's really weird for another scene (on a different Stack) to know that a route transition is ongoing.

I see these debounce decorators on ExNavigationStack, what if ExNavigationContext.performAction debounces instead?

chirag04 commented 7 years ago

cc @janicduplessis

grabbou commented 7 years ago

You can reproduce it by clicking "<" when stack is animating a new route as a result of push call.

grabbou commented 7 years ago

Fixed https://github.com/exponent/ex-navigation/commit/e4026ed878fdc28be155566dc1533e4bbe840796, we just have to update.