Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sandulat committed Oct 26, 2023
1 parent 209fa8e commit 59264b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/basebuilder/src/builder-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,11 @@ export function createBuilderStore<TBuilder extends Builder>(options: {
const { entityAttributesErrors, events: nextEvents } =
await validateEntityAttributes(entityId, data, options.builder);

newErrors.set(entityId, entityAttributesErrors ?? {});
if (entityAttributesErrors) {
newErrors.set(entityId, entityAttributesErrors);
} else {
newErrors.delete(entityId);
}

events = events.concat(nextEvents);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,6 @@ exports[`builder store > can validate a all attributes of all entities 1`] = `
}
]],
},
"6e0035c3-0d4c-445f-a42b-2d971225447c": {},
},
"schema": {
"entities": {
Expand Down

0 comments on commit 59264b8

Please sign in to comment.