Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Made UI more robust.
Browse files Browse the repository at this point in the history
  • Loading branch information
lourot committed Jul 11, 2018
1 parent b651690 commit 9b29141
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion reframe/views/profile/leftpanel/LeftPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const LeftPanel = props => {
let stars = 0;
for (const repo in props.user.contribs && props.user.contribs.repos) {
const contrib = props.user.contribs.repos[repo];
if (props.repos[contrib.full_name]) {
if (props.repos[contrib.full_name] && props.repos[contrib.full_name].stargazers_count) {
stars += contrib.percentage * props.repos[contrib.full_name].stargazers_count / 100;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ class RepoDescrAndDetails extends React.Component {
};

const languages = [];
for (const language of Object.keys(this.props.languages)) {
languages.push(<Language key={language} name={language}
color={this.props.languages[language].color} />);
if (this.props.languages) {
for (const language of Object.keys(this.props.languages)) {
languages.push(<Language key={language} name={language}
color={this.props.languages[language].color} />);
}
}
for (const tech of this.props.techs) {
languages.push(<Language key={tech} name={tech}
Expand Down

0 comments on commit 9b29141

Please sign in to comment.