Skip to content

Commit 82cb58e

Browse files
authored
fix: exception due to illegal access to item in an empty map (#747)
1 parent 8502a78 commit 82cb58e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/aws-appsync-subscription-link/src/realtime-subscription-handshake-link.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export class AppSyncRealTimeSubscriptionHandshakeLink extends ApolloLink {
347347
const {
348348
subscriptionFailedCallback,
349349
subscriptionReadyCallback
350-
} = this.subscriptionObserverMap.get(subscriptionId);
350+
} = this.subscriptionObserverMap.get(subscriptionId) || {};
351351

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

0 commit comments

Comments
 (0)