Skip to content

Commit

Permalink
fix(@aws-amplify/pubsub): fix undefined observer (aws-amplify#6436)
Browse files Browse the repository at this point in the history
  • Loading branch information
nubpro authored Aug 10, 2020
1 parent 0cb1d90 commit c1256bb
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 c1256bb

Please sign in to comment.