Skip to content

Commit

Permalink
simplify index calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Nov 4, 2024
1 parent cd8fe40 commit 63bcd81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ext/js/pages/settings/profile-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,7 @@ export class ProfileController {
this._updateProfileSelectOptions();

// Update profile index
if (settingsProfileIndex === profileIndex) {
this._settingsController.profileIndex = profileCurrentNew;
} else if (settingsProfileIndex > profileIndex) {
if (settingsProfileIndex >= profileIndex) {
this._settingsController.profileIndex = settingsProfileIndex - 1;
} else {
this._settingsController.refreshProfileIndex();
Expand Down

0 comments on commit 63bcd81

Please sign in to comment.