mirror of
https://github.com/openwrt/luci.git
synced 2026-08-29 06:22:49 +04:00
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:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user