File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
packages/next/src/views/Version Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ export const DefaultVersionView: React.FC<DefaultVersionsViewProps> = ({
81
81
82
82
const canUpdate = docPermissions ?. update ?. permission
83
83
84
+ const localeValues = locales . map ( ( locale ) => locale . value )
85
+
84
86
return (
85
87
< main className = { baseClass } >
86
88
< SetViewActions actions = { componentMap ?. actionsMap ?. Edit ?. Version } />
@@ -136,11 +138,7 @@ export const DefaultVersionView: React.FC<DefaultVersionsViewProps> = ({
136
138
fieldMap = { fieldMap }
137
139
fieldPermissions = { docPermissions ?. fields }
138
140
i18n = { i18n }
139
- locales = {
140
- locales
141
- ? locales . map ( ( { label } ) => ( typeof label === 'string' ? label : undefined ) )
142
- : [ ]
143
- }
141
+ locales = { localeValues }
144
142
version = {
145
143
globalConfig
146
144
? {
Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ export const VersionView: EditViewComponent = async (props) => {
99
99
100
100
const localeOptions : OptionObject [ ] =
101
101
localization &&
102
- localization ?. locales &&
103
102
localization . locales . map ( ( { code, label } ) => ( {
104
- label : typeof label === 'string' ? label : '' ,
103
+ label,
105
104
value : code ,
106
105
} ) )
107
106
You can’t perform that action at this time.
0 commit comments