File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,10 @@ export const canUserCancelPush = async (id: string, user: any) => {
108
108
const pushDetail = await getPush ( id ) ;
109
109
if ( ! pushDetail ) {
110
110
resolve ( false ) ;
111
+ return ;
111
112
}
112
113
113
- const repoName = pushDetail ? .repoName . replace ( '.git' , '' ) ;
114
+ const repoName = pushDetail . repoName . replace ( '.git' , '' ) ;
114
115
const isAllowed = await repo . isUserPushAllowed ( repoName , user ) ;
115
116
116
117
if ( isAllowed ) {
@@ -126,6 +127,7 @@ export const canUserApproveRejectPush = async (id: string, user: any) => {
126
127
const action = await getPush ( id ) ;
127
128
if ( ! action ) {
128
129
resolve ( false ) ;
130
+ return ;
129
131
}
130
132
const repoName = action ?. repoName . replace ( '.git' , '' ) ;
131
133
const isAllowed = await repo . canUserApproveRejectPushRepo ( repoName , user ) ;
You can’t perform that action at this time.
0 commit comments