Skip to content

Do selective lodash cloneDeep import #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/vue-fusioncharts-component.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { optionsMap, props } = require('./config.js');
const _ = require('lodash');
const cloneDeep = require('lodash/cloneDeep');
import { addDep, checkIfDataTableExists, cloneDataSource } from './utils';

export default (FC, ...options) => {
Expand Down Expand Up @@ -149,7 +149,7 @@ export default (FC, ...options) => {
if (newVal !== prevVal) {
let clonedDataSource;
if (this.datasource.series) {
clonedDataSource = _.cloneDeep(this.datasource);
clonedDataSource = cloneDeep(this.datasource);
} else clonedDataSource = this.datasource;
this.chartObj.setChartData(
clonedDataSource,
Expand All @@ -164,7 +164,7 @@ export default (FC, ...options) => {
if (newVal !== prevVal) {
let clonedDataSource;
if (this.dataSource.series) {
clonedDataSource = _.cloneDeep(this.dataSource);
clonedDataSource = cloneDeep(this.dataSource);
} else clonedDataSource = this.dataSource;
this.chartObj.setChartData(
clonedDataSource,
Expand Down Expand Up @@ -196,7 +196,7 @@ export default (FC, ...options) => {
if (strPrevClonedDataSource !== strCurrClonedDataSource) {
this.prevDataSource = cloneDataSource(ds, 'diff');
if (ds.series) {
ds = _.cloneDeep(ds);
ds = cloneDeep(ds);
}
this.chartObj.setChartData(ds, this.dataFormat || this.dataformat);
}
Expand Down