Skip to content

Commit

Permalink
set to null if field not present
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-pecora committed Dec 3, 2020
1 parent fae29c7 commit cb0c749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/schema-form/src/lib/model/formproperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export abstract class FormProperty {
for (const item of this.schema.visibleIf.oneOf) {
for (const depPath of Object.keys(item)) {
const prop = this.searchProperty(depPath);
const propVal = prop.value;
const propVal = prop ? prop.value : null;
if (this.__evaluateVisibilityIf(this, prop, dependencyPath, propVal, item[depPath])) {
return true
}
Expand All @@ -327,7 +327,7 @@ export abstract class FormProperty {
for (const item of this.schema.visibleIf.allOf) {
for (const depPath of Object.keys(item)) {
const prop = this.searchProperty(depPath);
const propVal = prop.value;
const propVal = prop ? prop.value : null;
if (!this.__evaluateVisibilityIf(this, prop, dependencyPath, propVal, item[depPath])) {
return false;
}
Expand Down

0 comments on commit cb0c749

Please sign in to comment.