add null check to debounce

This commit is contained in:
Salvatore Giordano
2021-03-03 10:09:47 +01:00
parent fb83062980
commit e8500892b2
@@ -12,6 +12,10 @@ void debounce({
List positionalArguments, List positionalArguments,
Map<Symbol, dynamic> namedArguments, Map<Symbol, dynamic> namedArguments,
}) { }) {
if (target == null) {
return;
}
if (timeouts.containsKey(target)) { if (timeouts.containsKey(target)) {
timeouts[target].cancel(); timeouts[target].cancel();
} }