Skip to content

Commit

Permalink
fix key filter
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Sep 4, 2023
1 parent fedb3e2 commit 0f1bc73
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun <T : ViewModel> resolveViewModel(
val factory = KoinViewModelFactory(vmClass, scope, qualifier, parameters)
val provider = ViewModelProvider(viewModelStore, factory, extras)
return when {
qualifier != null -> provider[qualifier.value + key?.let { "_$it" }, modelClass]
qualifier != null -> provider[qualifier.value + (key?.let { "_$it" } ?: ""), modelClass]
key != null -> provider[key, modelClass]
else -> provider[modelClass]
}
Expand Down

0 comments on commit 0f1bc73

Please sign in to comment.