From d5efbfc7fbdfb5927b4106f4f857ee61f49f6e42 Mon Sep 17 00:00:00 2001 From: Florian Feurstein Date: Tue, 8 Apr 2025 15:23:06 +0200 Subject: [PATCH] fix the bug I introduced in #48 --- broqer/op/combine_latest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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