From 881eada617a03765dfd0d7e5413b3b364b12650d Mon Sep 17 00:00:00 2001 From: Jocelyn Badgley Date: Thu, 25 Feb 2021 20:45:23 -0800 Subject: [PATCH] fix: don't crash when module doesn't map to an input (#76) Co-authored-by: Jocelyn Badgley --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9c8dc46..878d7c8 100644 --- a/index.js +++ b/index.js @@ -71,7 +71,7 @@ module.exports = (options) => { return; } - const base = bases[idx]; + const base = bases[idx] || ""; let total = 0; const data = {}; @@ -121,7 +121,7 @@ module.exports = (options) => { }); report({ - input : input[idx], + input : input[idx] || bundle.fileName, data, totals, total,