From 1d260b1ef0101af4b42344c911f0eafbce6f01f5 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Tue, 13 Dec 2022 13:25:13 +0200 Subject: [PATCH] fix test --- .../lens/public/app_plugin/save_modal_container.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx b/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx index bfeeb6a767cb6..e45fee5545c4e 100644 --- a/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx +++ b/x-pack/plugins/lens/public/app_plugin/save_modal_container.tsx @@ -63,11 +63,16 @@ export function SaveModalContainer({ savedObjectId = lastKnownDoc.savedObjectId; } - if (!lastKnownDoc?.title && initialContext && 'title' in initialContext && initialContext.title) { + if ( + !lastKnownDoc?.title && + initialContext && + 'isEmbeddable' in initialContext && + initialContext.isEmbeddable + ) { title = i18n.translate('xpack.lens.app.convertedLabel', { defaultMessage: '{title} (converted)', values: { - title: initialContext.title, + title: initialContext.title || `${initialContext.visTypeTitle} visualization`, }, }); }