Add comment

This commit is contained in:
RMidhunSuresh 2021-11-14 15:58:51 +05:30
parent 2d8b719ab0
commit 39d0708cca

View file

@ -154,7 +154,8 @@ export class IDBLogger extends BaseLogger {
for (const item of items) { for (const item of items) {
const queuedIdx = this._queuedItems.findIndex(i => i.id === item.id); const queuedIdx = this._queuedItems.findIndex(i => i.id === item.id);
if (queuedIdx === -1) { if (queuedIdx === -1) {
logs.delete(item.id); // todo: isn't id optional? do we need further checks here
logs.delete(item.id!); // resolve questionable use of non-null assertion operator?
} else { } else {
this._queuedItems.splice(queuedIdx, 1); this._queuedItems.splice(queuedIdx, 1);
} }