Skip to content

Commit

Permalink
do not warn about missing bm_rt
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhirkevich committed Jul 23, 2024
1 parent 0e57beb commit 7e9e437
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ internal class DefaultEvaluatorContext(
override val randomSource: RandomSource = RandomSource(),
) : EvaluationContext {

val result: Any
get() = checkNotNull(variables["\$bm_rt"]) {
"\$bm_rt is null"
}
val result: Any? get() = variables["\$bm_rt"]

fun reset() {
variables.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private class ExpressionEvaluatorImpl(expr : String) : ExpressionEvaluator {
try {
context.reset()
expression.invoke(this, context, state)
context.result.toListOrThis()
context.result?.toListOrThis() ?: raw(state)
} catch (t: Throwable) {
Compottie.logger?.warn(
"Error occurred in a Lottie expression. Try to disable expressions for Painter using enableExpressions=false: ${t.message}"
Expand Down

0 comments on commit 7e9e437

Please sign in to comment.