Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit af146fb

Browse files
committed
fix(types): fix TS type warnings
1 parent dbb091f commit af146fb

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/app/modules/angular-slickgrid/services/__tests__/utilities.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,6 @@ describe('Service/Utilies', () => {
369369
expect(output).toBe('(123.00)');
370370
});
371371

372-
it('should return a formatted string wrapped in parentheses when the input number is negative and the displayNegativeNumberWithParentheses argument is enabled', () => {
373-
const input = -123;
374-
const displayNegativeNumberWithParentheses = true;
375-
const output = formatNumber(input, 2, 2, displayNegativeNumberWithParentheses);
376-
expect(output).toBe('(123.00)');
377-
});
378-
379372
it('should return a formatted string and thousand separator wrapped in parentheses when the input number is negative and the displayNegativeNumberWithParentheses argument is enabled', () => {
380373
const input = -12345678;
381374
const displayNegativeNumberWithParentheses = true;

src/app/modules/angular-slickgrid/services/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export function decimalFormatted(input: number | string, minDecimal?: number, ma
208208
let output = '';
209209
if (integerNumber !== undefined && decimalNumber !== undefined) {
210210
output = `${integerNumber}${decimalSeparator}${decimalNumber}`;
211-
} else {
211+
} else if (integerNumber !== undefined && integerNumber !== null) {
212212
output = integerNumber;
213213
}
214214
return output;

0 commit comments

Comments
 (0)