diff --git a/src/svg/SVGImport.js b/src/svg/SVGImport.js index 3f772000..f0787d21 100644 --- a/src/svg/SVGImport.js +++ b/src/svg/SVGImport.js @@ -43,15 +43,15 @@ new function() { function getPoint(node, x, y, allowNull) { x = getValue(node, x, false, allowNull); y = getValue(node, y, false, allowNull); - return allowNull && x == null && y == null ? null - : new Point(x || 0, y || 0); + return allowNull && (x == null || y == null) ? null + : new Point(x, y); } function getSize(node, w, h, allowNull) { w = getValue(node, w, false, allowNull); h = getValue(node, h, false, allowNull); - return allowNull && w == null && h == null ? null - : new Size(w || 0, h || 0); + return allowNull && (w == null || h == null) ? null + : new Size(w, h); } // Converts a string attribute value to the specified type