Skip to content

Commit

Permalink
fix(@aws-amplify/pubsub): fix undefined observer (#6436)
Browse files Browse the repository at this point in the history
  • Loading branch information
nubpro authored and iartemiev committed Oct 13, 2020
1 parent ef416de commit 9ad0705
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ export class AWSAppSyncRealTimeProvider extends AbstractPubSubProvider {
private _errorDisconnect(msg: string) {
logger.debug(`Disconnect error: ${msg}`);
this.subscriptionObserverMap.forEach(({ observer }) => {
if (!observer.closed) {
if (observer && !observer.closed) {
observer.error({
errors: [{ ...new GraphQLError(msg) }],
});
Expand Down

0 comments on commit 9ad0705

Please sign in to comment.