From 24d6c9f9e6ff0c2ab163b20d4f9378e7eb735563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Wed, 6 Sep 2023 11:30:08 +0200 Subject: [PATCH] fix: Use `.length > 0` when checking length is not zero unicorn/explicit-length-check --- src/component/registry/bpmn-model-filters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/registry/bpmn-model-filters.ts b/src/component/registry/bpmn-model-filters.ts index 4bc90041f2..39dd240a76 100644 --- a/src/component/registry/bpmn-model-filters.ts +++ b/src/component/registry/bpmn-model-filters.ts @@ -28,7 +28,7 @@ export class ModelFiltering { filter(bpmnModel: BpmnModel, modelFilter?: ModelFilter): BpmnModel { const poolIdsFilter: string[] = []; const poolNamesFilter: string[] = []; - for (const filter of ensureIsArray(modelFilter?.pools).filter(p => p && Object.keys(p).length)) + for (const filter of ensureIsArray(modelFilter?.pools).filter(p => p && Object.keys(p).length > 0)) filter.id ? poolIdsFilter.push(filter.id) : filter.name && poolNamesFilter.push(filter.name); if (poolIdsFilter.length === 0 && poolNamesFilter.length === 0) {