fix: don't send empty data

This commit is contained in:
2023-01-03 16:23:26 +01:00
parent 8aca291c2f
commit b6872f03b8

View File

@@ -42,10 +42,13 @@ const throttledPM = (() => {
} }
if (lastUpdate + updateDelay <= now || finish) { if (lastUpdate + updateDelay <= now || finish) {
pm(limitData(dataCache.join('\n'))); const data = limitData(dataCache.join('\n'));
if (data) {
pm(data);
lastUpdate = now; lastUpdate = now;
dataCache = []; dataCache = [];
} }
}
if (tryAgain) { if (tryAgain) {
const nextTick = fn => setTimeout(fn, 0); const nextTick = fn => setTimeout(fn, 0);