Skip to content

Commit 8d769d8

Browse files
Merge pull request #638 from louistio/fix-and-operator
Use short-circuit AND operator in EventAggregator
2 parents 3db4048 + f04178c commit 8d769d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Caliburn.Micro.Core/EventAggregator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public virtual bool HandlerExistsFor(Type messageType)
1717
{
1818
lock (_handlers)
1919
{
20-
return _handlers.Any(handler => handler.Handles(messageType) & !handler.IsDead);
20+
return _handlers.Any(handler => handler.Handles(messageType) && !handler.IsDead);
2121
}
2222
}
2323

0 commit comments

Comments
 (0)