Skip to content

Commit

Permalink
fix: only show percent if not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Dec 10, 2020
1 parent fd26c17 commit fe573c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6791,7 +6791,7 @@ const directionSymbol = value => {
return '';
};

const formatSize = ({delta, percent}) => percent + directionSymbol(delta);
const formatSize = ({delta, percent}) => delta ? (percent + directionSymbol(delta)) : '';

function generateComment({
unchangedFiles,
Expand Down
2 changes: 1 addition & 1 deletion src/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const directionSymbol = value => {
return '';
};

const formatSize = ({delta, percent}) => percent + directionSymbol(delta);
const formatSize = ({delta, percent}) => delta ? (percent + directionSymbol(delta)) : '';

function generateComment({
unchangedFiles,
Expand Down

0 comments on commit fe573c4

Please sign in to comment.