Merge pull request #1114 from vpoverennov/fix_min_size

fix min_size to not output string with more than max characters
This commit is contained in:
Nicolas Hennion 2017-06-23 21:37:16 +02:00 committed by GitHub
commit a9584b11db
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ glancesApp.filter('min_size', function () {
return function (input, max) { return function (input, max) {
var max = max || 8; var max = max || 8;
if (input.length > max) { if (input.length > max) {
return "_" + input.substring(input.length - max) return "_" + input.substring(input.length - max + 1)
} }
return input return input
}; };

View File

@ -61,7 +61,7 @@ glancesApp.filter('min_size', function () {
return function (input, max) { return function (input, max) {
var max = max || 8; var max = max || 8;
if (input.length > max) { if (input.length > max) {
return "_" + input.substring(input.length - max) return "_" + input.substring(input.length - max + 1)
} }
return input return input
}; };