Skip to content

Commit

Permalink
fix: only use console.error if in the widget format
Browse files Browse the repository at this point in the history
  • Loading branch information
juba committed Aug 28, 2024
1 parent bba7b65 commit 7185383
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/pyobsplot-js/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export function generate_plot(spec, renderer) {
out = Plot.plot(out);
}
} catch (error) {
console.error(error);
if (renderer == "widget") {
console.error(error);
}
// If an error occured, display it as output
out = document.createElement("pre");
out.style.color = "#DD3333";
Expand Down

0 comments on commit 7185383

Please sign in to comment.