diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/0x.js/src/utils/heap.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/0x.js/src/utils/heap.ts b/packages/0x.js/src/utils/heap.ts index aaa17e719..1135c76b9 100644 --- a/packages/0x.js/src/utils/heap.ts +++ b/packages/0x.js/src/utils/heap.ts @@ -82,6 +82,9 @@ export class Heap<T> { } } } + if (swap === n) { + break; + } this.content[n] = this.content[swap]; this.content[swap] = element; n = swap; |