Skip to content

Commit

Permalink
chore: do not return field instance if field definition isn't available
Browse files Browse the repository at this point in the history
Resolves some timing issues.
  • Loading branch information
Skaiir committed Apr 19, 2024
1 parent 37b1bad commit 5bef6df
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ export class FormFieldInstanceRegistry {

getAllKeyed() {
return this.getAll().filter(({ id }) => {
const { type } = this._formFieldRegistry.get(id);
const formFieldDefinition = this._formFieldRegistry.get(id);

if (!formFieldDefinition) {
return false;
}

const { type } = formFieldDefinition;
const { config } = this._formFields.get(type);

return config.keyed;
Expand Down

0 comments on commit 5bef6df

Please sign in to comment.