[ADF-5372] - fixed wrong result pipe (#6925)

* [ADF-5372] - fixed wrong result pipe

* [ADF-5372] - fixed missing radix on parseInt
This commit is contained in:
Vito
2021-04-15 09:55:51 +01:00
committed by GitHub
parent 5a363670a0
commit 257614bfc0
2 changed files with 8 additions and 2 deletions

View File

@@ -27,8 +27,13 @@ export class FileSizePipe implements PipeTransform {
constructor(private translation: TranslationService) {
}
transform(bytes: number, decimals: number = 2): string {
if (bytes == null) {
transform(paramByte: any, decimals: number = 2): string {
if (paramByte == null) {
return '';
}
const bytes = parseInt(paramByte, 10);
if (isNaN(bytes)) {
return '';
}