forked from mirrors/misskey
fix(dev): tweak frontend-js-size.mjs
This commit is contained in:
parent
f6cfe15860
commit
3e1a090657
1 changed files with 1 additions and 1 deletions
2
.github/scripts/frontend-js-size.mjs
vendored
2
.github/scripts/frontend-js-size.mjs
vendored
|
|
@ -91,7 +91,7 @@ function formatDiffPercent(before, after) {
|
|||
if (before == null || before === 0 || after == null || after === 0) return '-';
|
||||
const diff = after - before;
|
||||
if (diff === 0) return `0%`;
|
||||
const percent = Math.round(diff / before * 100);
|
||||
const percent = Math.abs(Math.round(diff / before * 100));
|
||||
return formatColoredDiff(`${percent}%`, diff);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue