From 14fb9b9665dcb732666c72927fae78d8b792b142 Mon Sep 17 00:00:00 2001 From: Teja Date: Wed, 8 Jul 2015 11:25:04 +0200 Subject: [PATCH] bugfix. validating NaN correct now --- src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js index 6eb24b45..939e5c15 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js +++ b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js @@ -397,7 +397,7 @@ Snap.plugin(function (Snap, Element, Paper, global) { var d = ''; var valid = function (val) { - return !(typeof (val) !== 'number' || val === Infinity || val < 0); + return (isFinite(val) && (val >= 0)); }; // Possibly the cubed root of 6, but 1.81 works best