mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
chore(eslint): add strict-boolean-expressions rule (#25768)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user