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
I want to be able to change my route (from route with chart components -> to other component/route) without getting the following error:
Error: build.js:22 Uncaught TypeError: Cannot read property 'destroy' of undefined
Line where I get this error:
methods: {
render: function(e, t) {
var n = (0,
u.mergeOptions)(this.defaultOptions, t);
this._chart = new s.default(this.$els.canvas.getContext("2d"),{
type: "doughnut",
data: e,
options: n
}),
this._chart.generateLegend()
}
},
beforeDestroy: function() {
this._chart.destroy() // I get error on this line so I guess need to check if '_chart' exist
}
Actual Behavior
I don't need this error so want to be able to change route without getting this error.
BTW I'm using NPM to access this package so would be good if I can update it once you find the way to fix this issue
I tried to add the following code in chart component which I use in my template but I'm not sure if that will resolve my problem.
Expected Behavior
I want to be able to change my route (from route with chart components -> to other component/route) without getting the following error:
Error:
build.js:22 Uncaught TypeError: Cannot read property 'destroy' of undefined
Line where I get this error:
Actual Behavior
I don't need this error so want to be able to change route without getting this error.
BTW I'm using NPM to access this package so would be good if I can update it once you find the way to fix this issue
I tried to add the following code in chart component which I use in my template but I'm not sure if that will resolve my problem.
Environment
The text was updated successfully, but these errors were encountered: