Skip to content

Commit

Permalink
fix: Unexpected token '.'
Browse files Browse the repository at this point in the history
  • Loading branch information
eberlitz committed Mar 29, 2021
1 parent a1cb770 commit 7e00529
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24524,8 +24524,8 @@ function toFolder(path) {
}

function diffField(item, { emptyOnZero, showColorEmoji }) {
const after = item?.after ?? 0;
const before = item?.before ?? 0;
const after = (item && item.after) || 0;
const before = (item && item.before) || 0;
const pdiff = after - before;

if (emptyOnZero && pdiff === 0) {
Expand All @@ -24543,8 +24543,8 @@ function formatFloat(val) {
}

function percField(item, { withDiff, showOldValueForFiles }) {
const after = item?.after;
const before = item?.before;
const after = item && item.after;
const before = item && item.before;
const na = value => (value !== undefined ? formatFloat(value) : "N/A");
if (!showOldValueForFiles || !withDiff || after == before) {
return b(na(after))
Expand Down
8 changes: 4 additions & 4 deletions src/tabulate.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function toFolder(path) {
}

export function diffField(item, { emptyOnZero, showColorEmoji }) {
const after = item?.after ?? 0
const before = item?.before ?? 0
const after = (item && item.after) || 0
const before = (item && item.before) || 0
const pdiff = after - before

if (emptyOnZero && pdiff === 0) {
Expand All @@ -68,8 +68,8 @@ function formatFloat(val) {
}

export function percField(item, { withDiff, showOldValueForFiles }) {
const after = item?.after
const before = item?.before
const after = item && item.after
const before = item && item.before
const na = value => (value !== undefined ? formatFloat(value) : "N/A")
if (!showOldValueForFiles || !withDiff || after == before) {
return b(na(after))
Expand Down

0 comments on commit 7e00529

Please sign in to comment.