logQueue can be empty

This commit is contained in:
tophf 2018-05-24 21:09:00 +03:00
parent f0c31f75b3
commit 711a3afeee

View File

@ -244,7 +244,7 @@ global API_METHODS
const time = Date.now() - logLastWriteTime > 11e3 ? const time = Date.now() - logLastWriteTime > 11e3 ?
logQueue[0].time + ' ' : logQueue[0].time + ' ' :
''; '';
if (!logQueue[0].text) { if (logQueue[0] && !logQueue[0].text) {
logQueue.shift(); logQueue.shift();
if (lines[lines.length - 1]) lines.push(''); if (lines[lines.length - 1]) lines.push('');
} }