From f8989e6cbde64699cda66690609495b2073ed90e Mon Sep 17 00:00:00 2001 From: Stanislav Sysoev Date: Sun, 8 Apr 2018 21:24:01 +1000 Subject: [PATCH] fix: stats.children sometimes contains not full information --- lib/analyze.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/analyze.js b/lib/analyze.js index 0fa611b..0c4c72c 100644 --- a/lib/analyze.js +++ b/lib/analyze.js @@ -326,7 +326,9 @@ module.exports = function analyze( updateProgressBar /*: UpdateProgressBar */ = () => {} ) { const stats = - rawStats.children && rawStats.children.length + rawStats.children && + rawStats.children.length && + (!rawStats.chunks || !rawStats.chunks.length) ? joinStats(rawStats.children) : rawStats; const chunks = getChunksData(stats);