File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/admin/components/forms/field-types/Select Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,15 @@ const SelectInput: React.FC<SelectInputProps> = (props) => {
6565 valueToRender = value . map ( ( val ) => {
6666 const matchingOption = options . find ( ( option ) => option . value === val ) ;
6767 return {
68- label : getTranslation ( matchingOption . label , i18n ) ,
69- value : matchingOption . value ,
68+ label : matchingOption ? getTranslation ( matchingOption . label , i18n ) : val ,
69+ value : matchingOption ? .value ?? val ,
7070 } ;
7171 } ) ;
7272 } else if ( value ) {
7373 const matchingOption = options . find ( ( option ) => option . value === value ) ;
7474 valueToRender = {
75- label : getTranslation ( matchingOption . label , i18n ) ,
76- value : matchingOption . value ,
75+ label : matchingOption ? getTranslation ( matchingOption . label , i18n ) : value ,
76+ value : matchingOption ?. value ?? value ,
7777 } ;
7878 }
7979
You can’t perform that action at this time.
0 commit comments