Skip to content

Commit 2409c96

Browse files
committed
fix: resolve doubly linked list push issue
1 parent c8c9126 commit 2409c96

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/client/lib/client/linked-list.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ export class DoublyLinkedList<T> {
2929
++this.#length;
3030

3131
if (this.#tail === undefined) {
32-
return this.#tail = this.#head = {
32+
this.#head = {
33+
previous: undefined,
34+
next: this.#tail,
35+
value
36+
}
37+
return this.#tail = {
3338
previous: this.#head,
3439
next: undefined,
3540
value
36-
};
41+
}
3742
}
3843

3944
return this.#tail = this.#tail.next = {

0 commit comments

Comments
 (0)