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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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