Skip to content

Commit 676602d

Browse files
committed
fix: You can't insert before the first element with method insertBefore
1 parent 9cf0fb6 commit 676602d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

DS/LinkedList/Classes/LinkedList.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public function insertBefore(string $data = NULL, string $query = NULL) {
7474
} else {
7575
$previous->next = $newNode;
7676
}
77-
$previous->next = $newNode;
7877
$this->_totalNode++;
7978
break;
8079
}

0 commit comments

Comments
 (0)