Skip to content

Commit

Permalink
Merge pull request #638 from louistio/fix-and-operator
Browse files Browse the repository at this point in the history
Use short-circuit AND operator in EventAggregator
  • Loading branch information
nigel-sampson authored Sep 30, 2019
2 parents 3db4048 + f04178c commit 8d769d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Caliburn.Micro.Core/EventAggregator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public virtual bool HandlerExistsFor(Type messageType)
{
lock (_handlers)
{
return _handlers.Any(handler => handler.Handles(messageType) & !handler.IsDead);
return _handlers.Any(handler => handler.Handles(messageType) && !handler.IsDead);
}
}

Expand Down

0 comments on commit 8d769d8

Please sign in to comment.