Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fcfc928 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Do not throw when element is present in neither from- or toScene

Bug: 311600838
Test: N/A
Flag: N/A
Change-Id: Id2678cf2e3b80a08066889e2b42ef8f3eff6a52f
parent 54b89873
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -615,7 +615,9 @@ private inline fun <T> computeValue(
    val toValues = element.sceneValues[toScene]

    if (fromValues == null && toValues == null) {
        error("This should not happen, element $element is neither in $fromScene or $toScene")
        // TODO(b/311600838): Throw an exception instead once layers of disposed elements are not
        // run anymore.
        return lastValue()
    }

    // The element is shared: interpolate between the value in fromScene and the value in toScene.