diff --git a/src/file.worker.js b/src/file.worker.js index c283268..445daed 100644 --- a/src/file.worker.js +++ b/src/file.worker.js @@ -42,9 +42,12 @@ const throttledPM = (() => { } if (lastUpdate + updateDelay <= now || finish) { - pm(limitData(dataCache.join('\n'))); - lastUpdate = now; - dataCache = []; + const data = limitData(dataCache.join('\n')); + if (data) { + pm(data); + lastUpdate = now; + dataCache = []; + } } if (tryAgain) {