From efc3f5aabaf0d5bef4086b3644648c4e41d7e223 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 25 Jun 2018 13:26:13 +0800 Subject: [PATCH] - Avoid erring during resize on encountering MathML (which have no `style`) --- editor/svgcanvas.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index c331b0c2..03bb6001 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1390,6 +1390,9 @@ const mouseDown = function (evt) { const all = mouseTarget.getElementsByTagName('*'), len = all.length; for (i = 0; i < len; i++) { + if (!all[i].style) { // mathML + continue; + } all[i].style.vectorEffect = 'non-scaling-stroke'; if (iswebkit) { delayedStroke(all[i]); } }