Skip to content

Commit abbe634

Browse files
committed
fix: add the previous values as fallback
1 parent 959c687 commit abbe634

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

src/welcome/admin.js

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,17 @@ const SEARCH_TREE = [
167167
groups: [
168168
{
169169
id: 'role-manager',
170-
children: [
171-
...Object.values( editorRoles ),
172-
],
170+
children: ( editorRoles
171+
? Object.values( editorRoles )
172+
: [
173+
__( 'Role Manager', i18n ),
174+
__( 'Administrator', i18n ),
175+
__( 'Editor', i18n ),
176+
__( 'Author', i18n ),
177+
__( 'Contributor', i18n ),
178+
__( 'Subscriber', i18n ),
179+
]
180+
),
173181
},
174182
],
175183
},
@@ -181,7 +189,17 @@ const SEARCH_TREE = [
181189
id: 'custom-fields-settings',
182190
children: [
183191
__( 'Custom Fields', i18n ),
184-
...Object.values( editorRoles ),
192+
...( editorRoles
193+
? Object.values( editorRoles )
194+
: [
195+
__( 'Role Manager', i18n ),
196+
__( 'Administrator', i18n ),
197+
__( 'Editor', i18n ),
198+
__( 'Author', i18n ),
199+
__( 'Contributor', i18n ),
200+
__( 'Subscriber', i18n ),
201+
]
202+
),
185203
],
186204
},
187205
],

0 commit comments

Comments
 (0)