chore: remove empty map when query is empty (#1050)

This commit is contained in:
Nathan.fooo 2024-12-07 10:20:53 +08:00 committed by GitHub
parent 66deaf3fa3
commit a598aed5ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -439,6 +439,10 @@ where
queries: Vec<QueryCollab>,
from_editing_collab: bool,
) -> HashMap<String, QueryCollabResult> {
if queries.is_empty() {
return HashMap::new();
}
// Partition queries based on validation into valid queries and errors (with associated error messages).
let (valid_queries, mut results): (Vec<_>, HashMap<_, _>) =
queries