Skip to content

Commit

Permalink
Remove type error suppression.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Oct 20, 2020
1 parent 172579c commit 5e8b5d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ export function DataSections({ bucketSize, hasData, absoluteTime, relativeTime }
/>
</EuiFlexItem>
)}
{/* @ts-ignore see https://github.com/elastic/kibana/issues/81081 */}
{hasData?.ux?.hasData && (
{(hasData.ux as UXHasDataResponse).hasData && (
<EuiFlexItem grow={false}>
<UXSection
serviceName={(hasData.ux as UXHasDataResponse).serviceName as string}
Expand Down
5 changes: 2 additions & 3 deletions x-pack/plugins/observability/public/pages/overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { getEmptySections } from './empty_section';
import { LoadingObservability } from './loading_observability';
import { getNewsFeed } from '../../services/get_news_feed';
import { DataSections } from './data_sections';
import { useTrackPageview } from '../..';
import { useTrackPageview, UXHasDataResponse } from '../..';

interface Props {
routeParams: RouteParams<'/overview'>;
Expand Down Expand Up @@ -89,8 +89,7 @@ export function OverviewPage({ routeParams }: Props) {
if (id === 'alert') {
return alertStatus !== FETCH_STATUS.FAILURE && !alerts.length;
} else if (id === 'ux') {
// @ts-ignore see https://github.com/elastic/kibana/issues/81081
return !hasData[id]?.hasData;
return !(hasData[id] as UXHasDataResponse).hasData;
}
return !hasData[id];
});
Expand Down

0 comments on commit 5e8b5d9

Please sign in to comment.