File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -844,14 +844,18 @@ export const Set = (name, theme) => {
844844 return ;
845845 }
846846
847- const force = ! ! theme . force ;
847+ if ( ! name ) {
848+ name = theme . name ;
849+ }
850+
851+ const force = theme ?. force ;
848852
849853 if ( force ) {
850854 // If the force flag is set, make this theme the only available option.
851855 options = [
852856 {
853857 text : theme . title ? theme . title : $gettext ( "Custom" ) ,
854- value : theme . name ,
858+ value : name ,
855859 disabled : false ,
856860 } ,
857861 ] ;
@@ -860,7 +864,7 @@ export const Set = (name, theme) => {
860864 // unless a theme with the same name already exists.
861865 options . push ( {
862866 text : theme . title ? theme . title : $gettext ( "Custom" ) ,
863- value : theme . name ,
867+ value : name ,
864868 disabled : false ,
865869 } ) ;
866870 }
You can’t perform that action at this time.
0 commit comments