Skip to content

Commit 654afd2

Browse files
committed
log failure to find cell/output
1 parent b933cfd commit 654afd2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/backends/web_backend/nbagg_mpl.js

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ mpl.mpl_figure_comm = function(comm, msg) {
4444

4545
fig.parent_element = element.get(0);
4646
fig.cell_info = mpl.find_output_cell("<div id='" + id + "'></div>");
47+
if (!fig.cell_info) {
48+
console.error("Failed to find cell for figure", id, fig);
49+
return;
50+
}
4751

4852
var output_index = fig.cell_info[2]
4953
var cell = fig.cell_info[0];

0 commit comments

Comments
 (0)