Skip to content

Commit

Permalink
fix: exception due to illegal access to item in an empty map (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawngustaw authored Jan 22, 2024
1 parent 8502a78 commit 82cb58e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export class AppSyncRealTimeSubscriptionHandshakeLink extends ApolloLink {
const {
subscriptionFailedCallback,
subscriptionReadyCallback
} = this.subscriptionObserverMap.get(subscriptionId);
} = this.subscriptionObserverMap.get(subscriptionId) || {};

// This must be done before sending the message in order to be listening immediately
this.subscriptionObserverMap.set(subscriptionId, {
Expand Down

0 comments on commit 82cb58e

Please sign in to comment.