diff --git a/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx b/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx index 5b9aea75b1a2..67981ab3aede 100644 --- a/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx +++ b/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx @@ -112,14 +112,20 @@ export class MapEmbeddable return; } this._initializeStore(); - this._initializeOutput(); + try { + await this._initializeOutput(); + } catch (e) { + this.onFatalError(e); + return; + } + this._isInitialized = true; if (this._domNode) { this.render(this._domNode); } } - private async _initializeStore() { + private _initializeStore() { const store = this._savedMap.getStore(); store.dispatch(setReadOnly(true)); store.dispatch(disableScrollZoom()); diff --git a/x-pack/test/functional/apps/maps/embeddable/dashboard.js b/x-pack/test/functional/apps/maps/embeddable/dashboard.js index c5c02135ea97..3cca4c6562e2 100644 --- a/x-pack/test/functional/apps/maps/embeddable/dashboard.js +++ b/x-pack/test/functional/apps/maps/embeddable/dashboard.js @@ -55,6 +55,11 @@ export default function ({ getPageObjects, getService }) { return requestTimestamp; } + it('should set "data-title" attribute', async () => { + const [{ title }] = await PageObjects.dashboard.getPanelSharedItemData(); + expect(title).to.be('join example'); + }); + it('should pass index patterns to container', async () => { const indexPatterns = await filterBar.getIndexPatterns(); expect(indexPatterns).to.equal('meta_for_geo_shapes*,logstash-*');