Skip to content

Commit 6265b02

Browse files
Update cache.cjs
1 parent 03d9f9f commit 6265b02

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/cache.cjs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,8 @@ module.exports = class Cache {
243243

244244
// Iterator to iterate over cache with a 'for...of' loop
245245
*[Symbol.iterator]() {
246-
let node = this.#linkedList.head;
247-
while (node) {
248-
let next = node.next;
249-
if (this.has(node.value.key)) {
250-
yield { [node.value.key]: node.value.value };
251-
}
252-
node = next;
253-
}
246+
this.forEach(function (data) {
247+
yield data;
248+
});
254249
}
255250
};

0 commit comments

Comments
 (0)