File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,9 @@ export default function CIConfig({
71
71
const sourceConfigMaterial = sourceConfig . material ?. map ( ( material : MaterialOptionType ) => {
72
72
return {
73
73
...material ,
74
- label : material ?. name ,
75
- value : material ?. id ,
76
- startIcon : getGitProviderIcon ( material . url ) ,
74
+ label : material ?. name || '' ,
75
+ value : material ?. id || '' ,
76
+ startIcon : getGitProviderIcon ( material . url ) || '' ,
77
77
}
78
78
} )
79
79
_sourceConfig . material = sourceConfigMaterial
Original file line number Diff line number Diff line change @@ -75,20 +75,20 @@ export default function CIConfigForm({
75
75
: sourceConfig . material [ 0 ]
76
76
77
77
const getParsedCurrentMaterial = ( material ?) : SelectedGitMaterialType => {
78
- const _currentMaterial : SelectedGitMaterialType = {
79
- ...( material ? material : currentMaterial ) ,
80
- value : currentMaterial . checkoutPath ,
81
- label : currentMaterial . name ,
82
- startIcon : getGitProviderIcon ( currentMaterial . url ) ,
78
+ const _currentMaterial = {
79
+ ...material ,
80
+ name : material ?. name || currentMaterial . name ,
81
+ url : material ?. url || currentMaterial . url ,
82
+ value : material ?. checkoutPath || currentMaterial . checkoutPath ,
83
+ label : material ?. name || currentMaterial . name ,
84
+ startIcon : getGitProviderIcon ( material ?. url || currentMaterial . url ) ,
83
85
}
84
86
return _currentMaterial
85
87
}
86
88
87
89
const getParsedSourceConfig = ( ) : SourceConfigType => {
88
90
const _sourceConfig = { ...sourceConfig }
89
- _sourceConfig . material = _sourceConfig . material . map ( ( _material ) => {
90
- return getParsedCurrentMaterial ( _material )
91
- } )
91
+ _sourceConfig . material = _sourceConfig . material . map ( getParsedCurrentMaterial )
92
92
return _sourceConfig
93
93
}
94
94
You can’t perform that action at this time.
0 commit comments