diff --git a/src/components/ArchivePanel.svelte b/src/components/ArchivePanel.svelte
index 22939c254c..7d84299a90 100644
--- a/src/components/ArchivePanel.svelte
+++ b/src/components/ArchivePanel.svelte
@@ -5,8 +5,8 @@ import I18nKey from "../i18n/i18nKey";
import { i18n } from "../i18n/translation";
import { getPostUrlBySlug } from "../utils/url-utils";
-export let tags: string[];
-export let categories: string[];
+export let tags: string[] = [];
+export let categories: string[] = [];
export let sortedPosts: Post[] = [];
const params = new URLSearchParams(window.location.search);
diff --git a/src/components/widget/Categories.astro b/src/components/widget/Categories.astro
index b44e9da965..820f3e590a 100644
--- a/src/components/widget/Categories.astro
+++ b/src/components/widget/Categories.astro
@@ -2,10 +2,11 @@
import I18nKey from "../../i18n/i18nKey";
import { i18n } from "../../i18n/translation";
import { getCategoryList } from "../../utils/content-utils";
-import ButtonLink from "../control/ButtonLink.astro";
import WidgetLayout from "./WidgetLayout.astro";
+import CategoryNode from "./CategoryNode.astro";
const categories = await getCategoryList();
+const rootHasExpandable = categories.some((c) => c.children.length > 0);
const COLLAPSED_HEIGHT = "7.5rem";
const COLLAPSE_THRESHOLD = 5;
@@ -23,13 +24,7 @@ const style = Astro.props.style;