Skip to content

Commit

Permalink
Assertion error fixed
Browse files Browse the repository at this point in the history
fixed for node js 10.11.0:
 AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
  • Loading branch information
GrishaevPavel authored Oct 2, 2018
1 parent db622a5 commit c33ebe7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/spdy-transport/priority.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ PriorityNode.prototype.remove = function remove () {
PriorityNode.prototype.removeChild = function removeChild (child) {
this.children.weight -= child.weight
var index = utils.binarySearch(this.children.list, child, compareChildren)
assert(index !== -1)
/* assert(index !== -1) */

// Remove the child
this.children.list.splice(index, 1)
Expand Down Expand Up @@ -183,5 +183,7 @@ PriorityTree.prototype.addDefault = function addDefault (id) {

PriorityTree.prototype._removeNode = function _removeNode (node) {
delete this.map[node.id]
this.count--
this.count--;
var index = utils.binarySearch(this.list, node, compareChildren);
this.list.splice(index, 1);
}

0 comments on commit c33ebe7

Please sign in to comment.