From 36b4cb19ad56e6d8b11b80f9d5428533572f3a6a Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Wed, 27 Jan 2021 22:41:06 -0800 Subject: [PATCH] Fix deletions in context --- DB/Sources/DB/Content/ContentDatabase.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DB/Sources/DB/Content/ContentDatabase.swift b/DB/Sources/DB/Content/ContentDatabase.swift index 43dcd66..d383da4 100644 --- a/DB/Sources/DB/Content/ContentDatabase.swift +++ b/DB/Sources/DB/Content/ContentDatabase.swift @@ -470,7 +470,8 @@ public extension ContentDatabase { .removeDuplicates() .publisher(in: databaseWriter) .combineLatest(activeFiltersPublisher) - .compactMap { $0?.items(filters: $1) } + .map { $0?.items(filters: $1) } + .replaceNil(with: []) .eraseToAnyPublisher() }