Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow self referencing relationships when adding new collections…
… to config (#9360) ### What? Unable to add collections to the config dynamically if they reference their own collection in a relationship field. This was discovered while working on the folder view feature which dynamically adds collections to your config if it is enabled per collection. ### Why? When `sanitizeCollection` runs, it takes the current config. If you are sanitizing a collection before adding it to the config, that collection cannot have any self referencing relationship fields on it otherwise it fails the validRelationships check. ### How? Using a reducer we now initialize the validRelationships variable with the incoming collection slug.
- Loading branch information