Skip to content
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

Improve error message with id of the canvas #10495

Merged
merged 2 commits into from Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/core.controller.js
Expand Up @@ -111,7 +111,7 @@ class Chart {
if (existingChart) {
throw new Error(
'Canvas is already in use. Chart with ID \'' + existingChart.id + '\'' +
' must be destroyed before the canvas can be reused.'
' must be destroyed before the canvas with ID \'' + existingChart.canvas.id + '\' can be reused.'
);
}

Expand Down
2 changes: 1 addition & 1 deletion test/specs/core.controller.tests.js
Expand Up @@ -32,7 +32,7 @@ describe('Chart', function() {
expect(createChart).toThrow(new Error(
'Canvas is already in use. ' +
'Chart with ID \'' + chart.id + '\'' +
' must be destroyed before the canvas can be reused.'
' must be destroyed before the canvas with ID \'' + chart.canvas.id + '\' can be reused.'
));

chart.destroy();
Expand Down