Fix codacy warnings

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-14 11:54:38 +02:00
parent 22190b90cf
commit 06ea03689b
5 changed files with 8 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ app.filter('bytes', function () {
if (isNaN(parseFloat(bytes, 10)) || !isFinite(bytes)) {
return '-';
}
if (precision === undefined) {
if (typeof precision === 'undefined') {
precision = 2;
}
var units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'],