File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const MaterialForm = ({
5252 if ( ! url . length ) {
5353 return 'This is a required field'
5454 }
55- if ( isAWSCodeCommitURL ( formMaterial ? .gitProvider ?. url ) ) {
55+ if ( isAWSCodeCommitURL ( formMaterial . gitProvider ?. url ) ) {
5656 if ( isAWSCodeCommitURL ( url ) ) {
5757 return undefined
5858 }
@@ -178,7 +178,7 @@ const MaterialForm = ({
178178 material
179179 ? {
180180 gitProvider : isGitProviderValid ( material . gitProvider ) ,
181- url : isGitUrlValid ( material . url , formMaterial ? .gitProvider ?. id ) ,
181+ url : isGitUrlValid ( material . url , formMaterial . gitProvider ?. id ) ,
182182 checkoutPath : isCheckoutPathValid ( material . checkoutPath ) ,
183183 }
184184 : {
Original file line number Diff line number Diff line change @@ -112,14 +112,15 @@ const MaterialList = ({
112112 return undefined
113113 }
114114
115- const handleSingleGitMaterialUpdate = ( id : GitMaterialType [ 'id' ] ) => ( updatedMaterial , isError ) => {
116- if ( handleGitMaterialsChange ) {
117- handleGitMaterialsChange (
118- materials . map ( ( mat ) => ( mat . id === id ? updatedMaterial : mat ) ) ,
119- isError ,
120- )
115+ const handleSingleGitMaterialUpdate =
116+ ( id : GitMaterialType [ 'id' ] ) => ( updatedMaterial : GitMaterialType , isError : boolean ) => {
117+ if ( handleGitMaterialsChange ) {
118+ handleGitMaterialsChange (
119+ materials . map ( ( mat ) => ( mat . id === id ? updatedMaterial : mat ) ) ,
120+ isError ,
121+ )
122+ }
121123 }
122- }
123124
124125 const renderPageHeader = ( ) => (
125126 < >
Original file line number Diff line number Diff line change @@ -149,5 +149,5 @@ export interface CreateMaterialPayload {
149149
150150export interface UpdateMaterialPayload {
151151 appId : number
152- material : Omit < UpsertMaterialItemPayload , 'id' > & { id : number }
152+ material : UpsertMaterialItemPayload & { id : number }
153153}
You can’t perform that action at this time.
0 commit comments