Skip to content

Commit

Permalink
👌 Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Mar 3, 2022
1 parent 6eec900 commit 7be3ec7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const LensTopNavMenu = ({
initialContext,
]);

const canShowUnderlyingData = useMemo(() => {
const layerMetaInfo = useMemo(() => {
if (!activeDatasourceId || !discover) {
return;
}
Expand Down Expand Up @@ -342,7 +342,7 @@ export const LensTopNavMenu = ({
(dashboardFeatureFlag.allowByValueEmbeddables || Boolean(initialInput))
) || Boolean(initialContextIsEmbedded),
enableExportToCSV: Boolean(isSaveable && activeData && Object.keys(activeData).length),
showOpenInDiscover: Boolean(canShowUnderlyingData?.isVisible),
showOpenInDiscover: Boolean(layerMetaInfo?.isVisible),
isByValueMode: getIsByValueMode(),
allowByValue: dashboardFeatureFlag.allowByValueEmbeddables,
showCancel: Boolean(isLinkedToOriginatingApp),
Expand All @@ -366,7 +366,7 @@ export const LensTopNavMenu = ({
return undefined;
},
showUnderlyingDataWarning: () => {
return canShowUnderlyingData?.error;
return layerMetaInfo?.error;
},
},
actions: {
Expand Down Expand Up @@ -436,10 +436,10 @@ export const LensTopNavMenu = ({
}
},
getUnderlyingDataUrl: () => {
if (!canShowUnderlyingData) {
if (!layerMetaInfo) {
return;
}
const { error, meta } = canShowUnderlyingData;
const { error, meta } = layerMetaInfo;
// If Discover is not available, return
// If there's no data, return
if (error || !discover || !meta) {
Expand Down Expand Up @@ -470,7 +470,7 @@ export const LensTopNavMenu = ({
initialContextIsEmbedded,
isSaveable,
activeData,
canShowUnderlyingData,
layerMetaInfo,
getIsByValueMode,
savingToLibraryPermitted,
savingToDashboardPermitted,
Expand Down

0 comments on commit 7be3ec7

Please sign in to comment.