Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit faf21df

Browse files
author
Kohei Asai
authored
Bugfix: couldn't select the first empty card as a change target in community card editor (#184)
1 parent 5471b73 commit faf21df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/common_widgets/editable_community_cards.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ class _EditableCommunityCardsStateBus extends ChangeNotifier {
488488
int get selectedCardIndex => _selectedCardIndex;
489489

490490
set selectedCardIndex(int index) {
491-
if (_communityCards.length - 1 < index) {
492-
_selectedCardIndex = _communityCards.length - 1;
491+
if (_communityCards.length < index) {
492+
_selectedCardIndex = _communityCards.length;
493493
} else {
494494
_selectedCardIndex = index;
495495
}

0 commit comments

Comments
 (0)