Skip to content

Commit

Permalink
[Maps] fix tags changed in Maps Save dialog don't refresh until the m…
Browse files Browse the repository at this point in the history
…ap is reopened (#88849) (#88907)

* [Maps] fix tags changed in Maps Save dialog don't refresh until the map is reopened

* only set tags if newTags are provided
  • Loading branch information
nreese authored Jan 20, 2021
1 parent ac7c281 commit c474fe1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,12 @@ export class SavedMap {

const prevTitle = this._attributes.title;
const prevDescription = this._attributes.description;
const prevTags = this._tags;
this._attributes.title = newTitle;
this._attributes.description = newDescription;
if (newTags) {
this._tags = newTags;
}
this._syncAttributesWithStore();

let updatedMapEmbeddableInput: MapEmbeddableInput;
Expand All @@ -311,6 +315,7 @@ export class SavedMap {
// Error toast displayed by wrapAttributes
this._attributes.title = prevTitle;
this._attributes.description = prevDescription;
this._tags = prevTags;
return;
}

Expand Down

0 comments on commit c474fe1

Please sign in to comment.