2819 removed changes made in #2802. After further investigation we found out that removeHandlerFromOrchestrator didn't check if handlers were present in orchestrator, therefore in some situation calling this function ended up in removing wrong handler. Calling indexOf returned -1 and, as you can read in docs:
Negative index counts back from the end of the array
So instead of ignoring that, we simply removed wrong handler.
Test plan
Tested on example app (mostly on swipeable example) and example code from #2819
Description
2819 removed changes made in #2802. After further investigation we found out that
removeHandlerFromOrchestrator
didn't check if handlers were present in orchestrator, therefore in some situation calling this function ended up in removing wrong handler. CallingindexOf
returned-1
and, as you can read in docs:So instead of ignoring that, we simply removed wrong handler.
Test plan
Tested on example app (mostly on swipeable example) and example code from #2819