Skip to content

Commit a32311e

Browse files
committed
improvement based on feedback
1 parent 083b142 commit a32311e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/core/src/components/Form.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,17 +709,18 @@ export default class Form<
709709
};
710710

711711
/**
712-
* Returns if the retrievedSchema has changed the new retrievedSchema,
713-
* Else the old retrievedSchema to persist reference.
712+
* If the retrievedSchema has changed the new retrievedSchema is returned.
713+
* Otherwise, the old retrievedSchema is returned to persist reference.
714714
* - This ensures that AJV retrieves the schema from the cache when it has not changed,
715715
* avoiding the performance cost of recompiling the schema.
716+
*
716717
* @param retrievedSchema The new retrieved schema.
717718
* @returns The new retrieved schema if it has changed, else the old retrieved schema.
718719
*/
719-
private updateRetrievedSchema = (retrievedSchema: S) => {
720+
private updateRetrievedSchema(retrievedSchema: S) {
720721
const isTheSame = deepEquals(retrievedSchema, this.state?.retrievedSchema);
721722
return isTheSame ? this.state.retrievedSchema : retrievedSchema;
722-
};
723+
}
723724

724725
/**
725726
* Callback function to handle reset form data.

0 commit comments

Comments
 (0)