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) {
|
if (bucket.head === head) {
|
||||||
bucket.remove(entry);
|
bucket.remove(entry);
|
||||||
this.totalUsed--;
|
this.totalUsed--;
|
||||||
|
head = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// assert(i < this.used.length);
|
assert(!head);
|
||||||
} else {
|
} else {
|
||||||
for (let bucket of this.fresh) {
|
for (let bucket of this.fresh) {
|
||||||
if (bucket.delete(entry.key()))
|
if (bucket.delete(entry.key()))
|
||||||
@ -966,7 +967,7 @@ HostList.prototype.getLocal = function getLocal(src) {
|
|||||||
if (!src)
|
if (!src)
|
||||||
src = this.address;
|
src = this.address;
|
||||||
|
|
||||||
if (this.local.length === 0)
|
if (this.local.size === 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
for (let dest of this.local.values()) {
|
for (let dest of this.local.values()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user