Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 7dc1fb7

Browse files
Add null conditional operator into SwipeItemView OnCommandCanExecuteChanged method (#15869)
Co-authored-by: Federico Nembrini <25205086+FedericoNembrini@users.noreply.github.com>
1 parent 7114bf3 commit 7dc1fb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Xamarin.Forms.Core/SwipeItemView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void OnCommandParameterChanged()
6464

6565
void OnCommandCanExecuteChanged(object sender, EventArgs eventArgs)
6666
{
67-
IsEnabled = Command.CanExecute(CommandParameter);
67+
IsEnabled = Command?.CanExecute(CommandParameter) ?? true;
6868
}
6969
}
70-
}
70+
}

0 commit comments

Comments
 (0)