@rjsf/utils 5.13.1 → 5.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/utils.esm.js CHANGED
@@ -574,7 +574,7 @@ function retrieveSchemaInternal(validator, schema, rootSchema, rawFormData, expa
574
574
  return resolvedSchema;
575
575
  });
576
576
  }
577
- function resolveAnyOrOneOfSchemas(validator, schema, rootSchema, expandAllBranches, recurseList, rawFormData) {
577
+ function resolveAnyOrOneOfSchemas(validator, schema, rootSchema, expandAllBranches, rawFormData) {
578
578
  let anyOrOneOf;
579
579
  const { oneOf, anyOf, ...remaining } = schema;
580
580
  if (Array.isArray(oneOf)) {
@@ -586,7 +586,7 @@ function resolveAnyOrOneOfSchemas(validator, schema, rootSchema, expandAllBranch
586
586
  const formData = rawFormData === void 0 && expandAllBranches ? {} : rawFormData;
587
587
  const discriminator = getDiscriminatorFieldFromSchema(schema);
588
588
  anyOrOneOf = anyOrOneOf.map((s) => {
589
- return resolveAllReferences(s, rootSchema, recurseList);
589
+ return resolveAllReferences(s, rootSchema, []);
590
590
  });
591
591
  const option = getFirstMatchingOption(validator, formData, anyOrOneOf, rootSchema, discriminator);
592
592
  if (expandAllBranches) {
@@ -603,7 +603,6 @@ function resolveDependencies(validator, schema, rootSchema, expandAllBranches, r
603
603
  remainingSchema,
604
604
  rootSchema,
605
605
  expandAllBranches,
606
- recurseList,
607
606
  formData
608
607
  );
609
608
  return resolvedSchemas.flatMap(
@@ -2503,13 +2502,12 @@ var ParserValidator = class {
2503
2502
 
2504
2503
  // src/parser/schemaParser.ts
2505
2504
  function parseSchema(validator, recurseList, rootSchema, schema) {
2506
- const recurseRefs = [];
2507
- const schemas = retrieveSchemaInternal(validator, schema, rootSchema, void 0, true, recurseRefs);
2505
+ const schemas = retrieveSchemaInternal(validator, schema, rootSchema, void 0, true);
2508
2506
  schemas.forEach((schema2) => {
2509
2507
  const sameSchemaIndex = recurseList.findIndex((item) => isEqual7(item, schema2));
2510
2508
  if (sameSchemaIndex === -1) {
2511
2509
  recurseList.push(schema2);
2512
- const allOptions = resolveAnyOrOneOfSchemas(validator, schema2, rootSchema, true, recurseRefs);
2510
+ const allOptions = resolveAnyOrOneOfSchemas(validator, schema2, rootSchema, true);
2513
2511
  allOptions.forEach((s) => {
2514
2512
  if (PROPERTIES_KEY in s && s[PROPERTIES_KEY]) {
2515
2513
  forEach(schema2[PROPERTIES_KEY], (value) => {