diff --git a/formula-android/src/main/java/com/instacart/formula/android/internal/FragmentLifecycle.kt b/formula-android/src/main/java/com/instacart/formula/android/internal/FragmentLifecycle.kt index 1240e393..a558e402 100644 --- a/formula-android/src/main/java/com/instacart/formula/android/internal/FragmentLifecycle.kt +++ b/formula-android/src/main/java/com/instacart/formula/android/internal/FragmentLifecycle.kt @@ -29,16 +29,12 @@ internal fun Fragment.getFragmentKey(): FragmentKey { * one if it doesn't exist. */ internal fun Fragment.getFragmentInstanceId(): String { - return if (this is BaseFormulaFragment<*>) { - val arguments = getOrSetArguments() - val id = arguments.getString(FormulaFragment.ARG_FORMULA_ID, "") - id.ifBlank { - val initializedId = UUID.randomUUID().toString() - arguments.putString(FormulaFragment.ARG_FORMULA_ID, initializedId) - initializedId - } - } else { - "" + val arguments = getOrSetArguments() + val id = arguments.getString(FormulaFragment.ARG_FORMULA_ID, "") + return id.ifBlank { + val initializedId = UUID.randomUUID().toString() + arguments.putString(FormulaFragment.ARG_FORMULA_ID, initializedId) + initializedId } }