Skip to content

Commit

Permalink
feat/120: prevent reflow (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpvalente authored Jun 30, 2022
1 parent f4c5a2b commit a9ee0c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/common/utils/__tests__/dateConfig.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('test formatDisplay handles partial secs', () => {

describe('test string from formatDisplay function with hidezero', () => {
it('test with null values', () => {
const t = { val: null, result: '00:00:00' };
const t = { val: null, result: '00:00' };
expect(formatDisplay(t.val, true)).toBe(t.result);
});

Expand Down
2 changes: 1 addition & 1 deletion client/src/common/utils/dateConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const mth = 1000 * 60 * 60; // millis to hours
*/
export function formatDisplay(seconds, hideZero = false) {
if (typeof seconds !== 'number') {
return '00:00:00';
return hideZero ? '00:00' : '00:00:00';
}

// add an extra 0 if necessary
Expand Down

0 comments on commit a9ee0c3

Please sign in to comment.