Skip to content

Commit f7f53a8

Browse files
committed
fix(short-number-pipe): return 0 instead of null when using the short-number pipe on 0
1 parent 60d89eb commit f7f53a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/pipes/short-number/short-number.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class ShortNumberPipe implements PipeTransform {
1111
transform(number: number, args?: any): any {
1212
if (isNaN(number)) return null; // will only work value is a number
1313
if (number === null) return null;
14-
if (number === 0) return null;
14+
if (number === 0) return 0;
1515
let abs = Math.abs(number);
1616
const rounder = Math.pow(10, 1);
1717
const isNegative = number < 0; // will also work for Negative numbers

0 commit comments

Comments
 (0)