From 7f4ce1c8fee5bb698305a20fff4324f64e33c16f Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Tue, 2 Mar 2021 09:27:49 -0700 Subject: [PATCH] tslint --- .../application/datavisualizer/datavisualizer_selector.tsx | 5 +++++ .../file_based/components/about_panel/welcome_content.tsx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/x-pack/plugins/ml/public/application/datavisualizer/datavisualizer_selector.tsx b/x-pack/plugins/ml/public/application/datavisualizer/datavisualizer_selector.tsx index 03bdb23d69a46..fc03ff475e05a 100644 --- a/x-pack/plugins/ml/public/application/datavisualizer/datavisualizer_selector.tsx +++ b/x-pack/plugins/ml/public/application/datavisualizer/datavisualizer_selector.tsx @@ -68,6 +68,11 @@ export const DatavisualizerSelector: FC = () => { licenseManagement.enabled === true && isFullLicense() === false; + if (fileUpload === undefined) { + // eslint-disable-next-line no-console + console.error('File upload plugin not available'); + return null; + } const maxFileSize = fileUpload.getMaxBytesFormatted(); return ( diff --git a/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/about_panel/welcome_content.tsx b/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/about_panel/welcome_content.tsx index 558d8fe82c130..2c441e42dea2f 100644 --- a/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/about_panel/welcome_content.tsx +++ b/x-pack/plugins/ml/public/application/datavisualizer/file_based/components/about_panel/welcome_content.tsx @@ -35,6 +35,11 @@ export const WelcomeContent: FC = () => { services: { fileUpload }, } = useMlKibana(); + if (fileUpload === undefined) { + // eslint-disable-next-line no-console + console.error('File upload plugin not available'); + return null; + } const maxFileSize = fileUpload.getMaxBytesFormatted(); return (