From d136fdbafa1727a83a7cd9015723a41d4f65e28c Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Mon, 17 Sep 2018 22:12:36 -0500 Subject: [PATCH] Allow including null in number/range variables --- js/usercss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/usercss.js b/js/usercss.js index 64a708a6..54d41526 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -222,7 +222,7 @@ var usercss = (() => { if (Array.isArray(state.value) && state.value.length) { // label may be placed anywhere result.units = (state.value.find(i => typeof i === 'string') || '').replace(/[\d.+-]/g, ''); - const range = state.value.filter(i => typeof i === 'number'); + const range = state.value.filter(i => typeof i === 'number' || i == null); result.default = range[0]; result.min = range[1]; result.max = range[2];