Skip to content

Commit aed00c1

Browse files
committed
try to fix ambiguity:
1 parent de1f8ee commit aed00c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Realtime/RealtimeClientV2.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ public final class RealtimeClientV2: Sendable {
7474
///
7575
/// You can also use ``onHeartbeat(_:)`` for a closure based method.
7676
public var heartbeat: AsyncStream<HeartbeatStatus> {
77-
heartbeatSubject.values.compactMap { value -> HeartbeatStatus? in value }.eraseToStream()
77+
AsyncStream(
78+
heartbeatSubject.values.compactMap { $0 }
79+
as AsyncCompactMapSequence<AsyncStream<HeartbeatStatus?>, HeartbeatStatus>
80+
)
7881
}
7982

8083
/// Listen for connection status changes.

0 commit comments

Comments
 (0)