From 1f2f29336e389209411866a000d63fc8071bd87e Mon Sep 17 00:00:00 2001 From: Teja Date: Thu, 16 Jul 2015 11:58:52 +0200 Subject: [PATCH] bugfix. detecting empty 'd' attribute now correct. --- src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js index 60353bcc..7b32e488 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js +++ b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js @@ -62,8 +62,8 @@ Snap.plugin(function (Snap, Element, Paper, global) { //if(elem.type !== 'path') console.log("bake: converting " + elem.type + " to path"); var path_elem = elem.convertToPath(); - if (!path_elem || path_elem.attr(d) === '') - return 'M 0 0'; + if (!path_elem || path_elem.attr('d') === '' || path_elem.attr('d') === null) + return; // Rounding coordinates to dec decimals if (dec || dec === 0) {