diff --git a/broqer/op/combine_latest.py b/broqer/op/combine_latest.py index cbff705..a1c871a 100644 --- a/broqer/op/combine_latest.py +++ b/broqer/op/combine_latest.py @@ -109,13 +109,13 @@ def emit(self, value: Any, who: Publisher) -> None: # remember state of this source self._partial_state[index] = value - # if emits from publishers are missing or source of this emit - # is not one of emit_on -> don't evaluate and notify subscribers + # if emit_partial is False and emits from publishers are missing + # or source of this emit is not one of emit_on -> don't evaluate + # and notify subscribers - if not self._emit_partial and (self._missing or - (self._emit_on is not None and all( - who is not p for p in self._emit_on - ))): + if (self._emit_on is not None and + all(who is not p for p in self._emit_on)) or \ + (not self._emit_partial and self._missing): return None # evaluate