Skip to content

Commit 78c5278

Browse files
Fix for edge case
1 parent d7fe6c8 commit 78c5278

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

components/src/components/Map/Component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,11 @@ export default class Component extends (FieldComponent as any) {
335335

336336
isEmpty() {
337337
//This is in case a form designer makes the map read only and accidentally sets it as required
338+
338339
if (!this.component.allowSubmissions) return false;
339340
return (
340-
this.getValue().features.length === 0 ||
341-
this.getValue().features.length === this.defaultValue?.features.length
341+
this.getValue()?.features?.length === 0 ||
342+
this.getValue()?.features?.length === this.defaultValue?.features.length
342343
);
343344
}
344345

0 commit comments

Comments
 (0)