[Maps] fix tags changed in Maps Save dialog don't refresh until the map is reopened (#88849)

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

* only set tags if newTags are provided
This commit is contained in:
Nathan Reese 2021-01-20 14:29:47 -07:00 committed by GitHub
parent 954c887006
commit da8abdaf75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -292,8 +292,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;
@ -316,6 +320,7 @@ export class SavedMap {
// Error toast displayed by wrapAttributes
this._attributes.title = prevTitle;
this._attributes.description = prevDescription;
this._tags = prevTags;
return;
}