Commit 91cdfc0

HPCesia <me@hpcesia.com>
2025-02-15 07:51:09
fix: console errors
1 parent d528c7c
Changed files (1)
src
components
aside
siteinfo
src/components/aside/siteinfo/Tags.astro
@@ -31,8 +31,9 @@ const tagsMap = await getTags();
 <script>
   function setup() {
     const tags = document.getElementById('aside-siteinfo-tags');
-    const tagsList = tags?.children[0] as HTMLDivElement;
-    const moreBtn = tags?.children[1] as HTMLDivElement;
+    if (!tags) return;
+    const tagsList = tags.children[0] as HTMLDivElement;
+    const moreBtn = tags.children[1] as HTMLDivElement;
 
     const clientHeight = tagsList.clientHeight;
     const scrollHeight = tagsList.scrollHeight;