chore(eslint): add strict-boolean-expressions rule (#25768)

This commit is contained in:
Amanda Johnston
2022-08-23 11:50:02 -05:00
committed by GitHub
parent d75386baef
commit ae6aa0cb8e
38 changed files with 101 additions and 82 deletions

View File

@ -447,9 +447,9 @@ export class Segment implements ComponentInterface {
case 'last':
return buttons[buttons.length - 1];
case 'next':
return buttons[currIndex + 1] || buttons[0];
return buttons[currIndex + 1] ?? buttons[0];
case 'previous':
return buttons[currIndex - 1] || buttons[buttons.length - 1];
return buttons[currIndex - 1] ?? buttons[buttons.length - 1];
default:
return null;
}