diff --git a/src/display/svg.js b/src/display/svg.js index f7935dadc..12d143290 100644 --- a/src/display/svg.js +++ b/src/display/svg.js @@ -1137,6 +1137,10 @@ SVGGraphics = class SVGGraphics { if (!this.pendingClip) { return; } + if (!current.element) { + this.pendingClip = null; + return; + } // Add the current path to a clipping path. const clipId = `clippath${clipCount++}`;