Skip to content

Commit f2b1c63

Browse files
committed
isBLockedValueInParams: fix the data condition
1 parent f8acb96 commit f2b1c63

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import '../models/block_list.dart';
22

3+
bool isBlockListDisabled(BlockList options) {
4+
return options.list == null || options.list!.isEmpty || options.watchVariable == null;
5+
}
6+
37
bool isBlockedValueInParams(
48
BlockList options,
59
Map<String, dynamic> params,
610
) {
11+
if (isBlockListDisabled(options)) return false;
12+
713
final value = params[options.watchVariable];
8-
return options.list != null && options.list!.contains(value);
14+
return options.list!.contains(value);
915
}

0 commit comments

Comments
 (0)