Skip to content

Commit

Permalink
fix index error on move lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Jun 11, 2024
1 parent 362787e commit 03448d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Frontend/pages/move_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ class _MoveListViewState extends ConsumerState<MoveListView> {
plausible.event(name: "Add Sequence");
context.push<MoveList>("/moveLists/editMoveList", extra: ref.watch(moveListsProvider).last).then((value) => setState(() {
if (value != null) {
ref.watch(moveListsProvider).last = value;
if (ref.watch(moveListsProvider).isNotEmpty) {
ref.watch(moveListsProvider).last = value;
} else {
ref.watch(moveListsProvider).add(value);
}
ref.watch(moveListsProvider.notifier).store();
}
}));
Expand Down

0 comments on commit 03448d7

Please sign in to comment.