fix: state error

This commit is contained in:
Kieran 2023-11-27 15:55:08 +00:00
parent d42b139711
commit 40d477a35b
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -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()