Skip to content

Commit

Permalink
Returning an essential statement to re-balance the structure, fixes #134
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Oct 4, 2023
1 parent 0c1f7c3 commit 4d397a2
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 4 deletions.
4 changes: 4 additions & 0 deletions dist/tiny-lru.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ class LRU {
item.prev = this.last;
last.next = item;

if (prev !== null) {
prev.next = next;
}

if (next !== null) {
next.prev = prev;
}
Expand Down
4 changes: 4 additions & 0 deletions dist/tiny-lru.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ class LRU {
item.prev = this.last;
last.next = item;

if (prev !== null) {
prev.next = next;
}

if (next !== null) {
next.prev = prev;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/tiny-lru.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tiny-lru.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/tiny-lru.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@
item.prev = this.last;
last.next = item;

if (prev !== null) {
prev.next = next;
}

if (next !== null) {
next.prev = prev;
}
Expand Down
Loading

0 comments on commit 4d397a2

Please sign in to comment.