From 343b1381a2e43b8f6c13a5c6e530479e00ec7476 Mon Sep 17 00:00:00 2001 From: Jani Pehkonen Date: Tue, 28 May 2019 18:37:15 +0300 Subject: [PATCH] Don't clip if path is undefined in SVG back-end --- src/display/svg.js | 4 ++++ 1 file changed, 4 insertions(+) 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++}`;