From b4b54fe6a3fe69869db97d16b07d99df66a0a113 Mon Sep 17 00:00:00 2001 From: Rustam Sayfutdinov Date: Thu, 25 Jun 2020 11:05:30 +0500 Subject: [PATCH] Swap condition --- .../Animation/Animators/SolidColorBrushAnimator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Visuals/Animation/Animators/SolidColorBrushAnimator.cs b/src/Avalonia.Visuals/Animation/Animators/SolidColorBrushAnimator.cs index 8f3abcf068..9c94823608 100644 --- a/src/Avalonia.Visuals/Animation/Animators/SolidColorBrushAnimator.cs +++ b/src/Avalonia.Visuals/Animation/Animators/SolidColorBrushAnimator.cs @@ -50,13 +50,13 @@ namespace Avalonia.Animation.Animators finalTarget = new SolidColorBrush(immutableSolidColorBrush.Color); control.SetValue(Property, finalTarget); } - else if (!(targetVal is ISolidColorBrush)) + else if (targetVal is ISolidColorBrush) { - return Disposable.Empty; + finalTarget = targetVal as SolidColorBrush; } else { - finalTarget = targetVal as SolidColorBrush; + return Disposable.Empty; } if (_colorAnimator == null)