Skip to content

Commit

Permalink
fix _unsubscribeFromStore subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Jan 26, 2021
1 parent 6dff0d0 commit 860f99a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x-pack/plugins/maps/public/embeddable/map_embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class MapEmbeddable

this._savedMap = new SavedMap({ mapEmbeddableInput: initialInput });
this._initializeSaveMap();
this._subscription = this.getUpdated$().subscribe(() => this.onUpdate(this.input));
this._subscription = this.getUpdated$().subscribe(() => this.onUpdate());
}

private async _initializeSaveMap() {
Expand Down Expand Up @@ -140,7 +140,9 @@ export class MapEmbeddable
this._dispatchSetRefreshConfig(this.input.refreshConfig);
}

this._subscription = this.getUpdated$().subscribe(() => this.onUpdate());
this._unsubscribeFromStore = this._savedMap.getStore().subscribe(() => {
this._handleStoreChanges();
});
}

private async _initializeOutput() {
Expand Down

0 comments on commit 860f99a

Please sign in to comment.