Removed isNormal() because 'null == undefined' so 'null != value' is sufficient

This commit is contained in:
djmaze 2020-08-17 21:57:56 +02:00
parent 1b811428e7
commit f6a55898c7
13 changed files with 50 additions and 68 deletions

View file

@ -1,7 +1,7 @@
import ko from 'ko';
import { ContactPropertyType } from 'Common/Enums';
import { isNonEmptyArray, isNormal, pInt, pString } from 'Common/Utils';
import { isNonEmptyArray, pInt, pString } from 'Common/Utils';
import { emptyContactPic } from 'Common/Links';
import { AbstractModel } from 'Knoin/AbstractModel';
@ -58,7 +58,7 @@ class ContactModel extends AbstractModel {
if (isNonEmptyArray(json.Properties)) {
json.Properties.forEach(property => {
if (property && property.Type && isNormal(property.Value) && isNormal(property.TypeStr)) {
if (property && property.Type && null != property.Value && null != property.TypeStr) {
this.properties.push([pInt(property.Type), pString(property.Value), pString(property.TypeStr)]);
}
});