Commit 3107b1c4c329b12043bdf929a2f32df453d149ac

Authored by Jose Pinto
1 parent 322b0c9d11
Exists in master

ok uglify

Showing 1 changed file with 6 additions and 2 deletions   Show diff stats
... ... @@ -6,9 +6,13 @@ angular.module('focaFiltros', [])
6 6 };
7 7 })
8 8 .filter('rellenarDigitos', function() {
9   - return function(valor, cantidad, caracter = 0) {
  9 + return function(valor, cantidad, caracter) {
10 10 var ceros = '';
11   - for (var i = 0; i < cantidad; i++) {
  11 +
  12 + if(!caracter) {
  13 + caracter = 0;
  14 + }
  15 + for(var i = 0; i < cantidad; i++) {
12 16 ceros += caracter;
13 17 }
14 18 return (ceros + valor).slice(cantidad * -1);