Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit 364897b

Browse files
committed
Return this when inserting into empty array
1 parent 0df80c3 commit 364897b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sorted-array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class SortedArray<T> {
4343

4444
if (this.items.length === 0) {
4545
this.items = toInsert.sort(this.cmp.bind(this));
46-
return;
46+
return this;
4747
}
4848

4949
toInsert.forEach((element) => {

0 commit comments

Comments
 (0)