diff options
| -rw-r--r-- | packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SharedElement.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SharedElement.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SharedElement.kt index 599a152a23bd..167928b38e90 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SharedElement.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SharedElement.kt @@ -30,7 +30,8 @@ internal fun Element.shouldBeRenderedBy(content: ContentKey): Boolean { // the transition is running. If the [renderAuthority.size] is 1 it means that that this element // is currently composed only in one nesting level, which means that the render authority // is determined by "classic" shared element code. - return renderAuthority.size == 1 || renderAuthority.first() == content + return renderAuthority.size > 0 && + (renderAuthority.size == 1 || renderAuthority.first() == content) } /** |