Skip to content

Commit

Permalink
fix: send progress when container is null (#1074)
Browse files Browse the repository at this point in the history
Fix a bug introduced in #890 where when container is already null, the app crashes.
  • Loading branch information
WoLewicki committed Aug 25, 2021
1 parent 020a989 commit 32acf1d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ open class ScreenFragment : Fragment {
*/
val coalescingKey = (if (mProgress == 0.0f) 1 else if (mProgress == 1.0f) 2 else 3).toShort()
val container: ScreenContainer<*>? = screen.container
check(container is ScreenStack) { "ScreenStackFragment added into a non-stack container" }
val goingForward = container.goingForward
val goingForward = if (container is ScreenStack) container.goingForward else false
(screen.context as ReactContext)
.getNativeModule(UIManagerModule::class.java)
?.eventDispatcher
Expand Down

0 comments on commit 32acf1d

Please sign in to comment.