Skip to content

Commit d0e647a

Browse files
PatrickroelofsIqualityPatrickGermanJablo
authored
fix(plugin-redirects): add missing optional chaining (#12753)
### 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 --------- Co-authored-by: Patrick Roelofs <patrick.roelofs@iquality.nl> Co-authored-by: Germán Jabloñski <43938777+GermanJablo@users.noreply.github.com>
1 parent 9364d51 commit d0e647a

File tree

1 file changed

+1
-1
lines changed
  • packages/ui/src/elements/AddNewRelation

1 file changed

+1
-1
lines changed

packages/ui/src/elements/AddNewRelation/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const AddNewRelation: React.FC<Props> = ({
139139
}, [isDrawerOpen, relatedToMany])
140140

141141
const label = t('fields:addNewLabel', {
142-
label: getTranslation(relatedCollections[0].labels.singular, i18n),
142+
label: getTranslation(relatedCollections[0]?.labels.singular, i18n),
143143
})
144144

145145
if (show) {

0 commit comments

Comments
 (0)