File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/client/lib/client Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class DoublyLinkedList<T> {
3030
3131 if ( this . #tail === undefined ) {
3232 return this . #head = this . #tail = {
33- previous : undefined ,
33+ previous : this . #head ,
3434 next : undefined ,
3535 value
3636 } ;
@@ -73,7 +73,7 @@ export class DoublyLinkedList<T> {
7373 -- this . #length;
7474 const node = this . #head;
7575 if ( node . next ) {
76- node . next . previous = node . previous ;
76+ node . next . previous = undefined ;
7777 this . #head = node . next ;
7878 node . next = undefined ;
7979 } else {
@@ -92,11 +92,11 @@ export class DoublyLinkedList<T> {
9292 this . #head = node . next ;
9393 } else {
9494 if ( node . previous ) {
95- node . previous . next = node . next ;
95+ node . previous . next = node . next ;
96+ }
97+ if ( node . next ) {
98+ node . next . previous = node . previous ;
9699 }
97- }
98- if ( node . next ) {
99- node . next . previous = node . previous ;
100100 }
101101 node . previous = undefined ;
102102 node . next = undefined ;
You can’t perform that action at this time.
0 commit comments