From adc48ec13b6792c2880695296e1f627f2b91c662 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Mon, 17 Jun 2024 14:43:02 +0300 Subject: [PATCH] refactoring --- ui-ngx/src/app/shared/pipe/key-value-not-empty.pipe.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/pipe/key-value-not-empty.pipe.ts b/ui-ngx/src/app/shared/pipe/key-value-not-empty.pipe.ts index 60b09bab0b..d657564982 100644 --- a/ui-ngx/src/app/shared/pipe/key-value-not-empty.pipe.ts +++ b/ui-ngx/src/app/shared/pipe/key-value-not-empty.pipe.ts @@ -24,6 +24,7 @@ import { PipeTransform } from '@angular/core'; import { KeyValue } from "@angular/common"; +import { isDefinedAndNotNull } from "@core/utils"; @Pipe({ name: 'keyValueIsNotEmpty', @@ -51,7 +52,7 @@ export class KeyValueIsNotEmptyPipe implements PipeTransform { if (differChanges) { this.keyValues = []; differChanges.forEachItem((r: KeyValueChangeRecord) => { - if (r.currentValue !== null && r.currentValue !== undefined) { + if (isDefinedAndNotNull(r.currentValue)) { this.keyValues.push(this.makeKeyValuePair(r.key, r.currentValue!)); } });