Skip to content

Commit 4298a54

Browse files
Remove unneeded if which I believe was confusing compiler and causing a warning as we do check at top of function.
1 parent a24cfb4 commit 4298a54

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.SurfaceDial.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,8 @@ private static void TextBox_GotFocus_SurfaceDial(object sender, RoutedEventArgs
199199
return;
200200
}
201201

202-
if (_controller is not null)
203-
{
204-
_controller.RotationChanged -= Controller_RotationChanged;
205-
_controller.ButtonClicked -= Controller_ButtonClicked;
206-
}
202+
_controller.RotationChanged -= Controller_RotationChanged;
203+
_controller.ButtonClicked -= Controller_ButtonClicked;
207204

208205
SurfaceDialOptions? options = GetSurfaceDialOptions(_textBox) ?? SurfaceDialOptions.Default;
209206

0 commit comments

Comments
 (0)