Skip to content

Commit

Permalink
fix connection crash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Aug 27, 2024
1 parent 11b36cc commit 53fb36f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OnyxConnectionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class OnyxConnectionManager {
* Adds the connection to the eviction block list. Connections added to this list can never be evicted.
* */
addToEvictionBlockList(connection: Connection): void {
const connectionMetadata = this.connectionsMap.get(connection.id);
const connectionMetadata = this.connectionsMap.get(connection?.id);
if (!connectionMetadata) {
return;
}
Expand All @@ -245,7 +245,7 @@ class OnyxConnectionManager {
* which will enable it to be evicted again.
*/
removeFromEvictionBlockList(connection: Connection): void {
const connectionMetadata = this.connectionsMap.get(connection.id);
const connectionMetadata = this.connectionsMap.get(connection?.id);
if (!connectionMetadata) {
return;
}
Expand Down

0 comments on commit 53fb36f

Please sign in to comment.