Browse Source

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

Šimon Podlipský 6 years ago
parent
commit
4b0ad174ff
1 changed files with 2 additions and 2 deletions
  1. 2 2
      public/app/core/utils/kbn.ts

+ 2 - 2
public/app/core/utils/kbn.ts

@@ -1,4 +1,4 @@
-import _ from 'lodash';
+import { has } from 'lodash';
 import { getValueFormat, getValueFormatterIndex, getValueFormats, stringToJsRegex } from '@grafana/ui';
 import deprecationWarning from '@grafana/ui/src/utils/deprecationWarning';
 
@@ -193,7 +193,7 @@ kbn.calculateInterval = (range, resolution, lowLimitInterval) => {
 
 kbn.describe_interval = str => {
   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"');
   } else {
     return {