findNavController().navigate() throws IllegalStateException
This code sometimes results in a crash with IllegalStateException. I've found it out from Google Play Console and cannot reproduce it.
val listener = object : GameHistoryAdapter.RecyclerViewOnClickListener {
override fun onClick(v: View?, position: Int) {
val selectedItem = viewModel.getHistory()[position]
if (selectedItem is RandomWords) {
val resultViewModel: RandomWordsResultViewModel by hiltNavGraphViewModels(R.id.main_navigation)...