Skip to content

Commit 86fd060

Browse files
committed
Null
1 parent 3f0aa23 commit 86fd060

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

addon/services/-firestore-data-manager.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default class FirestoreDataManager extends Service {
9898
await this.setupDocRealtimeUpdates(modelName, docRef);
9999
}
100100

101-
return this.docListeners[listenerKey]?.snapshot!;
101+
return this.docListeners[listenerKey]!.snapshot;
102102
}
103103

104104
public async findAllRealtime(
@@ -111,7 +111,7 @@ export default class FirestoreDataManager extends Service {
111111
await this.setupColRealtimeUpdates(modelName, colRef);
112112
}
113113

114-
return this.colListeners[listenerKey]?.snapshot!;
114+
return this.colListeners[listenerKey]!.snapshot;
115115
}
116116

117117
public async queryRealtime(
@@ -122,7 +122,7 @@ export default class FirestoreDataManager extends Service {
122122
let unsubscribe: Unsubscribe | undefined;
123123

124124
if (this.queryListeners[queryId]) {
125-
unsubscribe = this.queryListeners[queryId]?.unsubscribe;
125+
unsubscribe = this.queryListeners[queryId]!.unsubscribe;
126126
delete this.queryListeners[queryId];
127127
}
128128

@@ -132,7 +132,7 @@ export default class FirestoreDataManager extends Service {
132132
unsubscribe();
133133
}
134134

135-
return this.queryListeners[queryId]?.snapshots!;
135+
return this.queryListeners[queryId]!.snapshots;
136136
}
137137

138138
public async findHasManyRealtime(
@@ -143,7 +143,7 @@ export default class FirestoreDataManager extends Service {
143143
let unsubscribe: Unsubscribe | undefined;
144144

145145
if (this.hasManyListeners[queryId]) {
146-
unsubscribe = this.hasManyListeners[queryId]?.unsubscribe;
146+
unsubscribe = this.hasManyListeners[queryId]!.unsubscribe;
147147
delete this.hasManyListeners[queryId];
148148
}
149149

@@ -153,7 +153,7 @@ export default class FirestoreDataManager extends Service {
153153
unsubscribe();
154154
}
155155

156-
return this.hasManyListeners[queryId]?.snapshots!;
156+
return this.hasManyListeners[queryId]!.snapshots;
157157
}
158158

159159
public async queryWithReferenceTo(
@@ -481,22 +481,22 @@ export default class FirestoreDataManager extends Service {
481481

482482
private destroyListener(type: string, key: string): void {
483483
if (type === 'doc' && this.docListeners[key]) {
484-
this.docListeners[key]?.unsubscribe();
484+
this.docListeners[key]!.unsubscribe();
485485
delete this.docListeners[key];
486486
}
487487

488488
if (type === 'col' && this.colListeners[key]) {
489-
this.colListeners[key]?.unsubscribe();
489+
this.colListeners[key]!.unsubscribe();
490490
delete this.colListeners[key];
491491
}
492492

493493
if (type === 'query' && this.queryListeners[key]) {
494-
this.queryListeners[key]?.unsubscribe();
494+
this.queryListeners[key]!.unsubscribe();
495495
delete this.queryListeners[key];
496496
}
497497

498498
if (type === 'hasMany' && this.hasManyListeners[key]) {
499-
this.hasManyListeners[key]?.unsubscribe();
499+
this.hasManyListeners[key]!.unsubscribe();
500500
delete this.hasManyListeners[key];
501501
}
502502
}

0 commit comments

Comments
 (0)