From 685a0d3328693b2c9cd434edd16169fe8ceaafbb Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 14 Jun 2021 10:35:54 +0200 Subject: [PATCH] handel empty objects like empty array --- api/js/jsapi/egw_app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/js/jsapi/egw_app.js b/api/js/jsapi/egw_app.js index d5c47fa73e..fb56898afd 100644 --- a/api/js/jsapi/egw_app.js +++ b/api/js/jsapi/egw_app.js @@ -252,10 +252,12 @@ export class EgwApp { return false; for (let field_filter of Object.values(filters)) { let val = value.col_filter[field_filter.col]; - if (val && (typeof val == "string" && val.trim().length > 0 || - typeof val == "object" && !jQuery.isEmptyObject(val))) { + if (val && (typeof val == "string" && val.trim().length > 0)) { field_filter.filter_values.push(val); } + else if (val && typeof val == "object" && !jQuery.isEmptyObject(val)) { + field_filter.filter_values = field_filter.filter_values.concat(Object.values(val)); + } } // check filters against pushData.acl data for (let field_filter of Object.values(filters)) {