diff --git a/ElementX/Sources/Other/CurrentValuePublisher.swift b/ElementX/Sources/Other/CurrentValuePublisher.swift index d54359425..4cb6c8e65 100644 --- a/ElementX/Sources/Other/CurrentValuePublisher.swift +++ b/ElementX/Sources/Other/CurrentValuePublisher.swift @@ -46,8 +46,9 @@ nonisolated extension CurrentValuePublisher where Failure == Never { /// this struct is discarded when the mapped publisher is chained inline, so anything eager /// (a live subscription feeding a second subject) would be cancelled and stop the updates. func map(_ transform: @escaping (Output) -> T) -> CurrentValuePublisher { - .init(upstream: upstream.map(transform).eraseToAnyPublisher(), - valueProvider: { transform(value) }) + .init(upstream: upstream.map(transform).eraseToAnyPublisher()) { + transform(value) + } } }