Fixing an issue found with queries, if an optional property isn't set then problems could arise before.

This commit is contained in:
mike12345567 2021-05-12 12:52:34 +01:00
parent fed94bea70
commit 53acb9745a
1 changed files with 3 additions and 0 deletions

View File

@ -58,6 +58,9 @@ async function enrichQueryFields(fields, parameters) {
// enrich the fields with dynamic parameters
for (let key of Object.keys(fields)) {
if (fields[key] == null) {
continue
}
if (typeof fields[key] === "object") {
// enrich nested fields object
enrichedQuery[key] = await enrichQueryFields(fields[key], parameters)