prevent console error for undefined value

pull/6827/head
Jens Ulferts 8 years ago
parent 49e8e05b8a
commit 233ee31323
  1. 4
      frontend/app/components/wp-display/field-types/wp-display-costs-by-type-field.module.ts

@ -49,7 +49,7 @@ export class CostsByTypeDisplayField extends DisplayField {
}).join(', ');
};
public isEmpty():boolean {
return this.value.elements.length === 0;
public isEmpty(): boolean {
return !this.value || this.value.elements.length === 0;
}
}

Loading…
Cancel
Save