hostlist: es6 fixes.
This commit is contained in:
parent
5b62a87a21
commit
972d98e0db
@ -668,11 +668,12 @@ HostList.prototype.remove = function remove(hostname) {
|
||||
if (bucket.head === head) {
|
||||
bucket.remove(entry);
|
||||
this.totalUsed--;
|
||||
head = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// assert(i < this.used.length);
|
||||
assert(!head);
|
||||
} else {
|
||||
for (let bucket of this.fresh) {
|
||||
if (bucket.delete(entry.key()))
|
||||
@ -966,7 +967,7 @@ HostList.prototype.getLocal = function getLocal(src) {
|
||||
if (!src)
|
||||
src = this.address;
|
||||
|
||||
if (this.local.length === 0)
|
||||
if (this.local.size === 0)
|
||||
return null;
|
||||
|
||||
for (let dest of this.local.values()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user