From 40d477a35be330dd5f6fabe2c16487ce1ce18a74 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 27 Nov 2023 15:55:08 +0000 Subject: [PATCH] fix: state error --- src/page/torrent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()