Skip to content

Commit

Permalink
fix: Use .length > 0 when checking length is not zero unicorn/expli…
Browse files Browse the repository at this point in the history
…cit-length-check
  • Loading branch information
csouchet committed Sep 6, 2023
1 parent 8a0c1a3 commit 24d6c9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/component/registry/bpmn-model-filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 24d6c9f

Please sign in to comment.