Skip to content

Commit

Permalink
fix: Assertion error Fix - Fixed Assertion true === false error (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshmehta7 authored and daviddias committed Nov 2, 2018
1 parent db622a5 commit ae5e558
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/spdy-transport/priority.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ 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)

// Remove the child
this.children.list.splice(index, 1)
if (index !== -1 && this.children.list.length >= index) {
this.children.list.splice(index, 1)
}
}

PriorityNode.prototype.removeChildren = function removeChildren () {
Expand Down

0 comments on commit ae5e558

Please sign in to comment.