this._head = item.next;
}
// This can only happen if size === 1 which is handled
// by the case above.
if (!item.previous) {
throw new Error('Invalid list');
}
this._tail = item.previous;
}
else {
const next = item.next;