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

Commit

Permalink
Bugfix: couldn't select the first empty card as a change target in co…
Browse files Browse the repository at this point in the history
…mmunity card editor (#184)
  • Loading branch information
Kohei Asai authored Aug 7, 2020
1 parent 5471b73 commit faf21df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/common_widgets/editable_community_cards.dart
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ class _EditableCommunityCardsStateBus extends ChangeNotifier {
int get selectedCardIndex => _selectedCardIndex;

set selectedCardIndex(int index) {
if (_communityCards.length - 1 < index) {
_selectedCardIndex = _communityCards.length - 1;
if (_communityCards.length < index) {
_selectedCardIndex = _communityCards.length;
} else {
_selectedCardIndex = index;
}
Expand Down

0 comments on commit faf21df

Please sign in to comment.