Skip to content

Commit

Permalink
fix(types): fix TS type warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding-SE committed Mar 18, 2020
1 parent dbb091f commit af146fb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,6 @@ describe('Service/Utilies', () => {
expect(output).toBe('(123.00)');
});

it('should return a formatted string wrapped in parentheses when the input number is negative and the displayNegativeNumberWithParentheses argument is enabled', () => {
const input = -123;
const displayNegativeNumberWithParentheses = true;
const output = formatNumber(input, 2, 2, displayNegativeNumberWithParentheses);
expect(output).toBe('(123.00)');
});

it('should return a formatted string and thousand separator wrapped in parentheses when the input number is negative and the displayNegativeNumberWithParentheses argument is enabled', () => {
const input = -12345678;
const displayNegativeNumberWithParentheses = true;
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/angular-slickgrid/services/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export function decimalFormatted(input: number | string, minDecimal?: number, ma
let output = '';
if (integerNumber !== undefined && decimalNumber !== undefined) {
output = `${integerNumber}${decimalSeparator}${decimalNumber}`;
} else {
} else if (integerNumber !== undefined && integerNumber !== null) {
output = integerNumber;
}
return output;
Expand Down

0 comments on commit af146fb

Please sign in to comment.