Skip to content

Commit

Permalink
Fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Dec 9, 2020
1 parent 8cef749 commit b157073
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ export const SearchBar: React.FunctionComponent<Props> = ({
useEffect(() => {
const fetchFields = async () => {
try {
const fields = (
((await data.indexPatterns.getFieldsForWildcard({
pattern: INDEX_NAME,
})) as IFieldType[]) || []
).filter((field) => {
const _fields: IFieldType[] = await data.indexPatterns.getFieldsForWildcard({
pattern: INDEX_NAME,
});
const fields = (_fields || []).filter((field) => {
if (fieldPrefix && field.name.startsWith(fieldPrefix)) {
for (const hiddenField of HIDDEN_FIELDS) {
if (field.name.startsWith(hiddenField)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const statusFilters = [
defaultMessage: 'Inactive',
}),
},
] as Array<{ label: string; status: string }>;
];

export const SearchAndFilterBar: React.FunctionComponent<{
agentPolicies: AgentPolicy[];
Expand Down

0 comments on commit b157073

Please sign in to comment.