chore: remove empty map when query is empty (#1050)
This commit is contained in:
parent
66deaf3fa3
commit
a598aed5ec
|
|
@ -439,6 +439,10 @@ where
|
||||||
queries: Vec<QueryCollab>,
|
queries: Vec<QueryCollab>,
|
||||||
from_editing_collab: bool,
|
from_editing_collab: bool,
|
||||||
) -> HashMap<String, QueryCollabResult> {
|
) -> HashMap<String, QueryCollabResult> {
|
||||||
|
if queries.is_empty() {
|
||||||
|
return HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
// Partition queries based on validation into valid queries and errors (with associated error messages).
|
// Partition queries based on validation into valid queries and errors (with associated error messages).
|
||||||
let (valid_queries, mut results): (Vec<_>, HashMap<_, _>) =
|
let (valid_queries, mut results): (Vec<_>, HashMap<_, _>) =
|
||||||
queries
|
queries
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue