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) &&