diff --git a/lib/hara.js b/lib/hara.js index ba7c154..faf84fe 100644 --- a/lib/hara.js +++ b/lib/hara.js @@ -38,7 +38,7 @@ const parseLargestCompressed = (data) => { return { url: normalizeUrl(item.request.url), - bytesTransferred: item.response._transferSize || item._bytesIn, + bytesTransferred: item.response._transferSize || item._bytesIn || 0, }; }; @@ -126,7 +126,7 @@ const parseRequests = (data) => { ), }, bytesTransferred: sum( - data.map((n) => n.response._transferSize || n._bytesIn) + data.map((n) => n.response._transferSize || n._bytesIn || 0) ), topUrl: parseTop(data.map((n) => normalizeUrl(n.request.url))), largest: parseLargest(data), diff --git a/package.json b/package.json index b8ec15a..211d0f3 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,6 @@ "git add --force" ] }, - "scripts": { - "start": "node ./lib/main.js" - }, "license": "MIT", "dependencies": { "chalk": "^4.1.1",