libs/web: explicitely cast input value of %m pattern to float in order to avoid throwing an exception in toFixed() with very low values
This commit is contained in:
parent
831654f504
commit
8cab9e2b8f
1 changed files with 1 additions and 1 deletions
|
@ -1032,7 +1032,7 @@ if( ! String.format )
|
|||
var pr = pPrecision ? Math.floor(10*parseFloat('0'+pPrecision)) : 2;
|
||||
|
||||
var i = 0;
|
||||
var val = (param || 0);
|
||||
var val = parseFloat(param || 0);
|
||||
var units = [ '', 'K', 'M', 'G', 'T', 'P', 'E' ];
|
||||
|
||||
for (i = 0; (i < units.length) && (val > mf); i++)
|
||||
|
|
Loading…
Reference in a new issue