diff --git a/src/page/torrent.tsx b/src/page/torrent.tsx index 8563751..72c4a6f 100644 --- a/src/page/torrent.tsx +++ b/src/page/torrent.tsx @@ -11,7 +11,7 @@ import { Button } from "../element/button"; export function TorrentPage() { const location = useLocation(); const { id } = useParams(); - const evState = "kind" in location.state ? (location.state as TaggedNostrEvent) : undefined; + const evState = location.state && "kind" in location.state ? (location.state as TaggedNostrEvent) : undefined; const rb = new RequestBuilder("torrent:event"); rb.withFilter()