Skip to content

Commit

Permalink
Add explicit type for err parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed Feb 11, 2019
1 parent 1c13f54 commit d9735bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/plugins/infra/public/pages/metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
EuiTitle,
} from '@elastic/eui';
import { InjectedIntl, injectI18n } from '@kbn/i18n/react';
import { GraphQLFormattedError } from 'graphql';
import React from 'react';
import styled, { withTheme } from 'styled-components';

Expand Down Expand Up @@ -130,7 +131,8 @@ export const MetricDetail = withTheme(
if (error) {
if (error.graphQLErrors) {
const invalidNodeError = error.graphQLErrors.find(
(err: any) => err.code === InfraMetricsErrorCodes.invalid_node
(err: GraphQLFormattedError) =>
err.code === InfraMetricsErrorCodes.invalid_node
);

if (invalidNodeError) {
Expand Down

0 comments on commit d9735bc

Please sign in to comment.