fix: don't send empty data
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user