1👍
You can use the API method getChart
to see if it exists. If it does not exist it will return undefined, if it does exist it will return that chart.
So you would get:
const tmpChart = Chart.getChart('canvasID');
if (tmpChart) {
tmpChart.destroy()
}
Source:stackexchange.com