Use has on set

Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
David Baker
2022-07-01 13:10:51 +01:00
committed by GitHub
parent 761eee2cdc
commit 5ebdf3e878

View File

@@ -31,7 +31,7 @@ export function RoomPage() {
const { hash, search } = useLocation(); const { hash, search } = useLocation();
const [viaServers, isEmbedded] = useMemo(() => { const [viaServers, isEmbedded] = useMemo(() => {
const params = new URLSearchParams(search); const params = new URLSearchParams(search);
return [params.getAll("via"), params.get("embed") !== null]; return [params.getAll("via"), params.has("embed")];
}, [search]); }, [search]);
const roomId = (maybeRoomId || hash || "").toLowerCase(); const roomId = (maybeRoomId || hash || "").toLowerCase();