···11-import type { ReviewCard } from "$lib/store";
11+import type { ReviewCard } from "$lib/model";
22import { cleanup, fireEvent, render, screen } from "@solidjs/testing-library";
33import { afterEach, describe, expect, it, vi } from "vitest";
44import { StudySession } from "./StudySession";
+1-2
web/src/components/social/CommentSection.tsx
···1111function buildTree(comments: Comment[]): CommentNode[] {
1212 const map = new Map<string, CommentNode>();
1313 const roots: CommentNode[] = [];
1414-1514 for (const c of comments) {
1615 map.set(c.id, { comment: c, children: [] });
1716 }
···95949695 <Show when={comments()} fallback={<div class="animate-pulse">Loading comments...</div>}>
9796 {(data) => {
9898- const list = data as unknown as Comment[];
9797+ const list = (Array.isArray(data) ? data : []) as Comment[];
9998 return (
10099 <div class="space-y-4">
101100 <For each={buildTree(list)}>{(node) => <CommentItem node={node} />}</For>