Skip to content

Commit

Permalink
Merge pull request #30 from taller2-grupo5-rostov-1c2022/dev
Browse files Browse the repository at this point in the history
Fix scores of 0
  • Loading branch information
n-zu authored Jul 7, 2022
2 parents 81e6441 + f8b612d commit e2f7208
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/albums/AlbumInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export default function AlbumInfo({ modalStatus, setModalStatus }) {
);

const getAvgScore = () => {
if (!album?.score) return "-";
if (album?.score !== 0 && !album?.score) return "-";
return Math.round(album?.score * 100) / 100;
}
};

useEffect(() => {
if (!response.error) return;
Expand Down

0 comments on commit e2f7208

Please sign in to comment.