Skip to content

Commit

Permalink
[ML] Fix missing typeof
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Feb 15, 2021
1 parent 9323382 commit 860c26f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/plugins/ml/common/util/datafeed_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const getDatafeedAggregations = (
};

export const getAggregationBucketsName = (aggregations: any): string | undefined => {
if (aggregations !== null && aggregations === 'object') {
if (aggregations !== null && typeof aggregations === 'object') {
const keys = Object.keys(aggregations);
return keys.length > 0 ? keys[0] : undefined;
}
Expand Down

0 comments on commit 860c26f

Please sign in to comment.