Просмотр исходного кода

stackdriver: remove lodash since object assign will do the trick

Erik Sundell 7 лет назад
Родитель
Сommit
7bdf97d3e6

+ 1 - 2
public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx

@@ -1,6 +1,5 @@
 import React, { PureComponent } from 'react';
 import { TemplateQueryProps } from 'app/types/plugins';
-import defaultsDeep from 'lodash/defaultsDeep';
 import SimpleSelect from './SimpleSelect';
 import { getMetricTypes, extractServicesFromMetricDescriptors } from '../functions';
 import { MetricFindQueryTypes, TemplateQueryComponentData } from '../types';
@@ -34,7 +33,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent<TemplateQue
     this.onServiceChange = this.onServiceChange.bind(this);
     this.onMetricTypeChange = this.onMetricTypeChange.bind(this);
     this.onLabelKeyChange = this.onLabelKeyChange.bind(this);
-    this.state = defaultsDeep(this.props.query, this.defaults);
+    this.state = Object.assign(this.defaults, this.props.query);
   }
 
   async componentDidMount() {