Skip to content

Commit cea378d

Browse files
committed
Allow nullable semantics in case there are really none
1 parent fa61cae commit cea378d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sentry-android-replay/src/main/java/io/sentry/android/replay/viewhierarchy/ComposeViewHierarchyNode.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ internal object ComposeViewHierarchyNode {
5353

5454
@JvmStatic
5555
internal fun retrieveSemanticsConfiguration(node: LayoutNode): SemanticsConfiguration? {
56-
try {
57-
return node.semanticsConfiguration
56+
return try {
57+
node.semanticsConfiguration
5858
} catch (t: Throwable) {
5959
// for backwards compatibility
6060
// Jetpack Compose 1.8 or older
61-
return if (getCollapsedSemanticsMethod != null) {
62-
getCollapsedSemanticsMethod!!.invoke(node) as SemanticsConfiguration
61+
if (getCollapsedSemanticsMethod != null) {
62+
getCollapsedSemanticsMethod!!.invoke(node) as SemanticsConfiguration?
6363
} else {
6464
// re-throw t if there's no way to retrieve semantics
6565
throw t

0 commit comments

Comments
 (0)