From f2dd503e610ed0e57883ee77c1e9f50991b1f70a Mon Sep 17 00:00:00 2001 From: Jonathan Bayless Date: Sun, 26 Jan 2020 13:01:34 -0500 Subject: [PATCH] fixes changes made in #196 --- lib/blocs/src/repeating/bloc.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/blocs/src/repeating/bloc.dart b/lib/blocs/src/repeating/bloc.dart index e6224087..2ac0da25 100644 --- a/lib/blocs/src/repeating/bloc.dart +++ b/lib/blocs/src/repeating/bloc.dart @@ -238,6 +238,7 @@ class RepeatsBloc extends Bloc { List newCars = event.cars .map((c) => (curRepeats.any((r) => r.cars.contains(c.name)) ? null : c)) .toList(); + newCars.removeWhere((c) => c == null); if (newCars.length == 0) { print('all cars have repeats, not adding defaults'); return;