Skip to content

Commit 683641c

Browse files
Merge pull request #76 from fusioncharts/feature/SUPPORT-2078-do-selective-lodash-cloneDeep-import
SUPPORT-2078: Update Integrations Components for FusionCharts [Contributor Pull Requests]
2 parents d81560a + 13006cf commit 683641c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vue-fusioncharts-component.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { optionsMap, props } = require('./config.js');
2-
const _ = require('lodash');
2+
const cloneDeep = require('lodash/cloneDeep');
33
import { addDep, checkIfDataTableExists, cloneDataSource } from './utils';
44

55
export default (FC, ...options) => {
@@ -149,7 +149,7 @@ export default (FC, ...options) => {
149149
if (newVal !== prevVal) {
150150
let clonedDataSource;
151151
if (this.datasource.series) {
152-
clonedDataSource = _.cloneDeep(this.datasource);
152+
clonedDataSource = cloneDeep(this.datasource);
153153
} else clonedDataSource = this.datasource;
154154
this.chartObj.setChartData(
155155
clonedDataSource,
@@ -164,7 +164,7 @@ export default (FC, ...options) => {
164164
if (newVal !== prevVal) {
165165
let clonedDataSource;
166166
if (this.dataSource.series) {
167-
clonedDataSource = _.cloneDeep(this.dataSource);
167+
clonedDataSource = cloneDeep(this.dataSource);
168168
} else clonedDataSource = this.dataSource;
169169
this.chartObj.setChartData(
170170
clonedDataSource,
@@ -196,7 +196,7 @@ export default (FC, ...options) => {
196196
if (strPrevClonedDataSource !== strCurrClonedDataSource) {
197197
this.prevDataSource = cloneDataSource(ds, 'diff');
198198
if (ds.series) {
199-
ds = _.cloneDeep(ds);
199+
ds = cloneDeep(ds);
200200
}
201201
this.chartObj.setChartData(ds, this.dataFormat || this.dataformat);
202202
}

0 commit comments

Comments
 (0)