Fix hexadecimal conversion to show leading zeros.

Fixes #2805.
This commit is contained in:
hunicus committed 2022-12-07 00:06:06 -05:00
1 parent adc40e68e2
commit 4004c826de
1 file changed
+1 -1
@@ -5,6 +5,6 @@ import { Pipe, PipeTransform } from '@angular/core';
})
export class Decimal2HexPipe implements PipeTransform {
transform(decimal: number): string {
return `0x` + decimal.toString(16);
return `0x` + ( decimal.toString(16) ).padStart(8, '0');
}
}