From fb6b9cb1f7ee29bb2e8d7178479717f650d0b7b5 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 23 Jul 2012 16:59:28 -0700 Subject: Fix: Adding a check for element w/h/t/l This fixes an issue with elements with no set width, height, top, left values from being handling through the PI. Currently those values will default to zero, a secondary fix will address this to show no value in PI and other panels. --- js/lib/NJUtils.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index cfb7ef07..bca9b05b 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -241,6 +241,7 @@ exports.NJUtils = Montage.create(Component, { // 100px will return the following array: [100, px] getValueAndUnits: { value: function(input) { + if (!input) return [null, null]; var numberValue = parseFloat(input); // Ignore all whitespace, digits, negative sign and "." when looking for units label -- cgit v1.2.3