From 7767be1f1a513e93390a1460cbcf75d638842a51 Mon Sep 17 00:00:00 2001 From: Pierre Plagnes Date: Mon, 2 Sep 2019 19:05:20 +0200 Subject: [PATCH] Check if query is null --- lib/mongo_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo_service.dart b/lib/mongo_service.dart index 9a3e5deb..5a2dfee6 100644 --- a/lib/mongo_service.dart +++ b/lib/mongo_service.dart @@ -54,7 +54,7 @@ class MongoService extends Service> { } else if (key == 'query' && (allowQuery == true || !params.containsKey('provider'))) { var query = params[key] as Map; - query.forEach((key, v) { + query?.forEach((key, v) { var value = v is Map ? _filterNoQuery(v) : v; if (!_NO_QUERY.contains(key) &&