Skip to content

Commit

Permalink
handle edge cases for gitlab and github kit
Browse files Browse the repository at this point in the history
  • Loading branch information
samad-yar-khan committed Apr 11, 2022
1 parent 234a6be commit 11e9d8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/components/github/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import GithubPullRequestsList from "./githubpullreqeusts";
import GithubRepo from "./githubrepo";

const Github = (props) => {
if(props.type === 'issues'){
if(props.type === 'issues' && typeof props.githubData.issues !== "undefined"){
return (<GithubIssuesList data={props.githubData}/>);
}else if(props.type === 'pulls'){
}else if(props.type === 'pulls' && typeof props.githubData.pulls !== "undefined"){
return(<GithubPullRequestsList data={props.githubData}/>)
}else if(props.type === 'contributors'){
}else if(props.type === 'contributors' && typeof props.githubData.contributors !== "undefined"){
return (<ContributorsList data={props.githubData}/>);
}
return (<GithubRepo data={props.githubData.repositoryData}/>);
Expand Down
6 changes: 3 additions & 3 deletions app/components/gitlab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import GitlabMergeList from "./gitlabMergeRequestList";
import GitlabProject from "./gitlabProject";

const Gitlab = (props) => {
if(props.type === 'issues'){
if(props.type === 'issues'&& typeof props.gitlabData.issues !=="undefined"){
return (<GitlabIssuesList data={props.gitlabData}/>);
}else if(props.type === 'merges'){
}else if(props.type === 'merges' && typeof props.gitlabData.merges !=="undefined"){
return(<GitlabMergeList data={props.gitlabData}/>)
}else if(props.type === 'members'){
}else if(props.type === 'members' && typeof props.gitlabData.members!=="undefined"){
return (<MembersList data={props.gitlabData}/>);
}
return (<GitlabProject data={props.gitlabData.project_data}/>);
Expand Down

0 comments on commit 11e9d8f

Please sign in to comment.