fix: don't send empty data
This commit is contained in:
@@ -42,10 +42,13 @@ const throttledPM = (() => {
|
||||
}
|
||||
|
||||
if (lastUpdate + updateDelay <= now || finish) {
|
||||
pm(limitData(dataCache.join('\n')));
|
||||
const data = limitData(dataCache.join('\n'));
|
||||
if (data) {
|
||||
pm(data);
|
||||
lastUpdate = now;
|
||||
dataCache = [];
|
||||
}
|
||||
}
|
||||
|
||||
if (tryAgain) {
|
||||
const nextTick = fn => setTimeout(fn, 0);
|
||||
|
||||
Reference in New Issue
Block a user