You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2019/06/12 11:06:35 UTC
[kibble] 01/02: allow 0 as valid value here,
don't remove if set to this
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git
commit 1436d49abc70c087e1bf7ba93086cc177f6950cf
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Jun 12 13:06:20 2019 +0200
allow 0 as valid value here, don't remove if set to this
---
ui/js/coffee/widget.coffee | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/js/coffee/widget.coffee b/ui/js/coffee/widget.coffee
index c091c10..8e67d55 100644
--- a/ui/js/coffee/widget.coffee
+++ b/ui/js/coffee/widget.coffee
@@ -89,7 +89,7 @@ updateWidgets = (type, target, eargs) ->
globArgs[k] = v
g = []
for k,v of globArgs
- if k and v
+ if k and (typeof v != 'undefined' and v != null)
g.push(k + '=' + v)
gargs = "?" + g.join("&")
wloc = window.location.pathname + gargs
@@ -106,7 +106,7 @@ updateWidgets = (type, target, eargs) ->
widget.args.eargs = widget.args.eargs and widget.args.eargs or {}
for k, v of eargs
widget.args.eargs[k] = v
- if not v
+ if (typeof v == 'undefined' or v == null)
delete widget.args.eargs[k]
switch widget.args.type
when 'donut' then widget.load(donut)