From cca64a9afe4379b5158c6ac5d962c26c7abf1fcd Mon Sep 17 00:00:00 2001 From: Ashish Agrawal Date: Mon, 19 Jun 2023 11:42:43 -0700 Subject: [PATCH] address minor comments Signed-off-by: Ashish Agrawal --- src/plugins/vis_augmenter/public/utils/utils.ts | 2 +- .../public/view_events_flyout/components/utils.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/vis_augmenter/public/utils/utils.ts b/src/plugins/vis_augmenter/public/utils/utils.ts index 1037218fbde8..77aa14a204c8 100644 --- a/src/plugins/vis_augmenter/public/utils/utils.ts +++ b/src/plugins/vis_augmenter/public/utils/utils.ts @@ -47,7 +47,7 @@ export const isEligibleForVisLayers = (vis: Vis, uiSettingsClient?: IUiSettingsC vis.params?.type === 'line'; // Checks if the augmentation setting is enabled - const config = uiSettingsClient !== undefined ? uiSettingsClient : getUISettings(); + const config = uiSettingsClient ?? getUISettings(); const isAugmentationEnabled = config.get(PLUGIN_AUGMENTATION_ENABLE_SETTING); return isAugmentationEnabled && hasValidXaxis && hasCorrectAggregationCount && hasOnlyLineSeries; }; diff --git a/src/plugins/vis_augmenter/public/view_events_flyout/components/utils.tsx b/src/plugins/vis_augmenter/public/view_events_flyout/components/utils.tsx index f5a26254f534..aa07c497fcad 100644 --- a/src/plugins/vis_augmenter/public/view_events_flyout/components/utils.tsx +++ b/src/plugins/vis_augmenter/public/view_events_flyout/components/utils.tsx @@ -53,7 +53,7 @@ export async function fetchVisEmbeddable( savedObjectId: string, embeddableStart?: EmbeddableStart ): Promise { - const embeddableLoader = embeddableStart !== undefined ? embeddableStart : getEmbeddable(); + const embeddableLoader = embeddableStart ?? getEmbeddable(); const embeddableVisFactory = embeddableLoader.getEmbeddableFactory('visualization'); const contextInput = { filters: getQueryService().filterManager.getFilters(),