Skip to content

Commit e97fe73

Browse files
committed
fix build error
1 parent 6c85e08 commit e97fe73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/InnerLinkPreview.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@
258258

259259
if (this.cachedContent.size >= this.MAX_CACHE_SIZE) {
260260
const oldestKey = this.cachedContent.keys().next().value;
261-
this.cachedContent.delete(oldestKey);
261+
if (oldestKey) {
262+
this.cachedContent.delete(oldestKey);
263+
}
262264
}
263265
this.cachedContent.set(href, contentHtml);
264266
return contentHtml;

0 commit comments

Comments
 (0)