Skip to content

Commit

Permalink
Fix BindableCommand enable/disable bool
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding-Enthusiast committed Aug 9, 2024
1 parent b327bbd commit a642aee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Denovo/MVVM/BindableCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public BindableCommand(Action executeMethod, Func<bool> canExecuteMethod)

public void RaiseCanExecuteChanged() => CanExecuteChanged(this, EventArgs.Empty);

public bool CanExecute(object parameter) => !(CanExecuteMethod is null) && CanExecuteMethod();
public bool CanExecute(object parameter) => CanExecuteMethod is null || CanExecuteMethod();

public void Execute(object parameter) => ExecuteMethod?.Invoke();
}
Expand Down

0 comments on commit a642aee

Please sign in to comment.