diff --git a/moor/lib/src/runtime/executor/stream_queries.dart b/moor/lib/src/runtime/executor/stream_queries.dart index 6b80c29c..6992f22f 100644 --- a/moor/lib/src/runtime/executor/stream_queries.dart +++ b/moor/lib/src/runtime/executor/stream_queries.dart @@ -88,7 +88,8 @@ class StreamQueryStore { /// Handles updates on a given table by re-executing all queries that read /// from that table. Future handleTableUpdates(Set tables) async { - final affectedStreams = _activeStreams + final activeStreams = List.from(_activeStreams); + final affectedStreams = activeStreams .where((stream) => stream._fetcher.readsFrom.any(tables.contains)); for (var stream in affectedStreams) {