From e90927c2fd054cfe88227f9f8a01c739f2bb6247 Mon Sep 17 00:00:00 2001 From: Michael Deal Date: Thu, 18 May 2017 22:44:03 -0700 Subject: [PATCH] Change to regular if() statement --- canvas2svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canvas2svg.js b/canvas2svg.js index 6c1660c..e58e0d7 100644 --- a/canvas2svg.js +++ b/canvas2svg.js @@ -488,7 +488,7 @@ var parent = this.__closestGroupOrSvg(); if (parent.childNodes.length > 0) { if (this.__currentElement.nodeName === "path") { - this.__currentElementsToStyle || (this.__currentElementsToStyle = { element: parent, children: [] }); + if (!this.__currentElementsToStyle) this.__currentElementsToStyle = {element: parent, children: []}; this.__currentElementsToStyle.children.push(this.__currentElement) this.__applyCurrentDefaultPath(); }