Commit 4b0ad174 by Šimon Podlipský Committed by Torkel Ödegaard

Frontend/utils: Import has only from lodash (#17311)

parent 83af1bdf
import _ from 'lodash'; import { has } from 'lodash';
import { getValueFormat, getValueFormatterIndex, getValueFormats, stringToJsRegex } from '@grafana/ui'; import { getValueFormat, getValueFormatterIndex, getValueFormats, stringToJsRegex } from '@grafana/ui';
import deprecationWarning from '@grafana/ui/src/utils/deprecationWarning'; import deprecationWarning from '@grafana/ui/src/utils/deprecationWarning';
...@@ -193,7 +193,7 @@ kbn.calculateInterval = (range, resolution, lowLimitInterval) => { ...@@ -193,7 +193,7 @@ kbn.calculateInterval = (range, resolution, lowLimitInterval) => {
kbn.describe_interval = str => { kbn.describe_interval = str => {
const matches = str.match(kbn.interval_regex); const matches = str.match(kbn.interval_regex);
if (!matches || !_.has(kbn.intervals_in_seconds, matches[2])) { if (!matches || !has(kbn.intervals_in_seconds, matches[2])) {
throw new Error('Invalid interval string, expecting a number followed by one of "Mwdhmsy"'); throw new Error('Invalid interval string, expecting a number followed by one of "Mwdhmsy"');
} else { } else {
return { return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment