luci-base: cbi.js: properly round down numbers for %u and %d patterns
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
21bf16ce04
commit
99f5d4e902
1 changed files with 2 additions and 2 deletions
|
@ -1360,11 +1360,11 @@ String.prototype.format = function()
|
|||
break;
|
||||
|
||||
case 'd':
|
||||
subst = (+param || 0);
|
||||
subst = ~~(+param || 0);
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
subst = Math.abs(+param || 0);
|
||||
subst = ~~Math.abs(+param || 0);
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
|
|
Loading…
Reference in a new issue