You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vue-chartjs throws an error: cannot find length of undefined referring to partial variable.
I am using the 'lodash-webpack-plugin' in my application and this is my config for the plugin. { coercions: true, paths: true, guards: true, unicode: true, collections: true, shorthands: true }
I have tried clone this repo and the adding this plugin and running the tests. Ten of the twenty-six tests fail.
Here are the errors which resulted after running the tests with the webpack-plugin included:
mergeOptions.js
✗ should replace old a and b if a and b are new
undefined is not an object (evaluating 'partials.length')
wrapper@webpack:///~/lodash/_createWrap.js:28:0 <- index.js:35529:31
mergeOptions@webpack:///src/helpers/options.js:9:761 <- index.js:34445:786
webpack:///test/unit/specs/helpers/options.spec.js:19:26 <- index.js:38559:41
✗ should add c if c is new
undefined is not an object (evaluating 'partials.length')
wrapper@webpack:///~/lodash/_createWrap.js:28:0 <- index.js:35529:31
mergeOptions@webpack:///src/helpers/options.js:9:761 <- index.js:34445:786
webpack:///test/unit/specs/helpers/options.spec.js:25:26 <- index.js:38565:41
should destroy chart instance
BarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Bar.spec.js:54:34 <- index.js:209:35
should destroy chart instance
BubbleChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Bubble.spec.js:54:34 <- index.js:37883:35
should destroy chart instance
DoughnutChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Doughnut.spec.js:54:34 <- index.js:37985:35
should destroy chart instance
HorizontalBarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/HorizontalBar.spec.js:54:34 <- index.js:38087:35
should destroy chart instance
LineChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Line.spec.js:54:34 <- index.js:38189:35
should destroy chart instance
PieChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Pie.spec.js:53:34 <- index.js:38290:35
should destroy chart instance
PolarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/PolarArea.spec.js:54:34 <- index.js:38392:35
should destroy chart instance
RadarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Radar.spec.js:53:34 <- index.js:38493:35
should replace old a and b if a and b are new
mergeOptions.js
undefined is not an object (evaluating 'partials.length')
wrapper@webpack:///~/lodash/_createWrap.js:28:0 <- index.js:35529:31
mergeOptions@webpack:///src/helpers/options.js:9:761 <- index.js:34445:786
webpack:///test/unit/specs/helpers/options.spec.js:19:26 <- index.js:38559:41
should add c if c is new
mergeOptions.js
undefined is not an object (evaluating 'partials.length')
wrapper@webpack:///~/lodash/_createWrap.js:28:0 <- index.js:35529:31
mergeOptions@webpack:///src/helpers/options.js:9:761 <- index.js:34445:786
webpack:///test/unit/specs/helpers/options.spec.js:25:26 <- index.js:38565:41
Environment
vue.js version: 2.2.6
vue-chart.js version: 2.5.0
npm version: >=6.9.0
The text was updated successfully, but these errors were encountered:
mh, I never used the lodash-webpack-plugin but as I understand it will remove functions form lodash right?
Well, the mergeOptions helper is importing merge from lodash: import merge from 'lodash/fp/merge'
It seems that the webpack-plugin is removing merge? Not sure in which feature set this might fall, maybe clone. You could try to enable the cloning methods in your config.
Expected Behavior
Vue-chartjs should rendered chart
Actual Behavior
Vue-chartjs throws an error: cannot find length of undefined referring to partial variable.
I am using the 'lodash-webpack-plugin' in my application and this is my config for the plugin.
{ coercions: true, paths: true, guards: true, unicode: true, collections: true, shorthands: true }
I have tried clone this repo and the adding this plugin and running the tests. Ten of the twenty-six tests fail.
Here are the errors which resulted after running the tests with the webpack-plugin included:
mergeOptions.js
✗ should replace old a and b if a and b are new
undefined is not an object (evaluating 'partials.length')
wrapper@webpack:///~/lodash/_createWrap.js:28:0 <- index.js:35529:31
mergeOptions@webpack:///src/helpers/options.js:9:761 <- index.js:34445:786
webpack:///test/unit/specs/helpers/options.spec.js:19:26 <- index.js:38559:41
PhantomJS 2.1.1 (Linux 0.0.0): Executed 26 of 26 (10 FAILED) (0.158 secs / 0.037 secs)
TOTAL: 10 FAILED, 16 SUCCESS
should destroy chart instance
BarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Bar.spec.js:54:34 <- index.js:209:35
should destroy chart instance
BubbleChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Bubble.spec.js:54:34 <- index.js:37883:35
should destroy chart instance
DoughnutChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Doughnut.spec.js:54:34 <- index.js:37985:35
should destroy chart instance
HorizontalBarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/HorizontalBar.spec.js:54:34 <- index.js:38087:35
should destroy chart instance
LineChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Line.spec.js:54:34 <- index.js:38189:35
should destroy chart instance
PieChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Pie.spec.js:53:34 <- index.js:38290:35
should destroy chart instance
PolarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/PolarArea.spec.js:54:34 <- index.js:38392:35
should destroy chart instance
RadarChart
undefined is not an object (evaluating 'vm.$children[0]._chart.chart')
webpack:///test/unit/specs/Radar.spec.js:53:34 <- index.js:38493:35
should replace old a and b if a and b are new
mergeOptions.js
undefined is not an object (evaluating 'partials.length')
wrapper@webpack:///~/lodash/_createWrap.js:28:0 <- index.js:35529:31
mergeOptions@webpack:///src/helpers/options.js:9:761 <- index.js:34445:786
webpack:///test/unit/specs/helpers/options.spec.js:19:26 <- index.js:38559:41
should add c if c is new
mergeOptions.js
undefined is not an object (evaluating 'partials.length')
wrapper@webpack:///~/lodash/_createWrap.js:28:0 <- index.js:35529:31
mergeOptions@webpack:///src/helpers/options.js:9:761 <- index.js:34445:786
webpack:///test/unit/specs/helpers/options.spec.js:25:26 <- index.js:38565:41
Environment
The text was updated successfully, but these errors were encountered: