File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import GithubPullRequestsList from "./githubpullreqeusts";
4
4
import GithubRepo from "./githubrepo" ;
5
5
6
6
const Github = ( props ) => {
7
- if ( props . type === 'issues' ) {
7
+ if ( props . type === 'issues' && typeof props . githubData . issues !== "undefined" ) {
8
8
return ( < GithubIssuesList data = { props . githubData } /> ) ;
9
- } else if ( props . type === 'pulls' ) {
9
+ } else if ( props . type === 'pulls' && typeof props . githubData . pulls !== "undefined" ) {
10
10
return ( < GithubPullRequestsList data = { props . githubData } /> )
11
- } else if ( props . type === 'contributors' ) {
11
+ } else if ( props . type === 'contributors' && typeof props . githubData . contributors !== "undefined" ) {
12
12
return ( < ContributorsList data = { props . githubData } /> ) ;
13
13
}
14
14
return ( < GithubRepo data = { props . githubData . repositoryData } /> ) ;
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import GitlabMergeList from "./gitlabMergeRequestList";
4
4
import GitlabProject from "./gitlabProject" ;
5
5
6
6
const Gitlab = ( props ) => {
7
- if ( props . type === 'issues' ) {
7
+ if ( props . type === 'issues' && typeof props . gitlabData . issues !== "undefined" ) {
8
8
return ( < GitlabIssuesList data = { props . gitlabData } /> ) ;
9
- } else if ( props . type === 'merges' ) {
9
+ } else if ( props . type === 'merges' && typeof props . gitlabData . merges !== "undefined" ) {
10
10
return ( < GitlabMergeList data = { props . gitlabData } /> )
11
- } else if ( props . type === 'members' ) {
11
+ } else if ( props . type === 'members' && typeof props . gitlabData . members !== "undefined" ) {
12
12
return ( < MembersList data = { props . gitlabData } /> ) ;
13
13
}
14
14
return ( < GitlabProject data = { props . gitlabData . project_data } /> ) ;
You can’t perform that action at this time.
0 commit comments