We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4af1703 commit 0840d53Copy full SHA for 0840d53
src/plot.js
@@ -296,7 +296,7 @@ export function plot(options = {}) {
296
figure.appendChild(svg);
297
if (caption != null) {
298
const figcaption = document.createElement("figcaption");
299
- figcaption.appendChild(caption instanceof Node ? caption : document.createTextNode(caption));
+ figcaption.appendChild(caption?.ownerDocument ? caption : document.createTextNode(caption));
300
figure.appendChild(figcaption);
301
}
302
0 commit comments