-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(plugin-redirects): add missing optional chaining #12753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(plugin-redirects): add missing optional chaining #12753
Conversation
…n RedirectsPluginConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
This is a breaking change. The correct solution would be to check for the existence of collections where it's used. Probably an if or optional chaining in the plugin.
I will have a look, thanks for the feedback! |
Thank you. I hadn't read your next comment, but it makes sense to me:
Please ask me to review it when it's ready. |
Hey @GermanJablo I managed to debug and figure out what the issue actually was, it seemed to be a translation in the AddNewRelation element. I tested both an empty and filled array, let me know if I can improve it further, I've seen some optional chaining like this in a few other translations so it seemed fine to me! This change is however not restricted to only the plugin, so let me know what I should do. This is my first contribution so I apologize for some hand holding. |
…uired in RedirectsPluginConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
🚀 This is included in version v3.43.0 |
What?
Updates the redirects plugin types to make collections a required type
Why?
Currently not including the collections object when importing the plugin causes an error to occur when going to the page in the UI, also it cannot generate types. Likely due to it unable to make a reference to a collection.
How?
Makes collections required
Fixes #12709