Skip to content

Commit 2f15744

Browse files
fix: remove non-null assertion in websocket subject handling
1 parent 7f16ebe commit 2f15744

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/core/services/websocket/websocket.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ export class WebSocket implements OnDestroy {
153153

154154
// If already connected and not yet subscribed via STOMP, do it now.
155155
// (If not connected yet, resubscribeAll() will handle it on onConnect.)
156-
const subject = this.topicSubjects.get(topic)!;
157-
if (this.connected && !this.stompSubscriptions.has(topic)) {
156+
const subject = this.topicSubjects.get(topic);
157+
if (subject && this.connected && !this.stompSubscriptions.has(topic)) {
158158
this.createStompSubscription(topic, subject);
159159
}
160160

0 commit comments

Comments
 (0)