Skip to content
Snippets Groups Projects
Commit 471c9cd2 authored by Jorik Schellekens's avatar Jorik Schellekens
Browse files

Fix empty array not falsy bug

parent 5f5eb60c
No related branches found
No related tags found
No related merge requests found
...@@ -120,7 +120,7 @@ const LinkPreview: React.FC<IProps> = ({ link }: IProps) => { ...@@ -120,7 +120,7 @@ const LinkPreview: React.FC<IProps> = ({ link }: IProps) => {
const hses = useHSs(link); const hses = useHSs(link);
if (!hses) { if (!hses.length) {
content = ( content = (
<> <>
<DefaultPreview link={link} /> <DefaultPreview link={link} />
......
...@@ -77,7 +77,7 @@ export const WrappedInviterPreview: React.FC<WrappedInviterProps> = ({ ...@@ -77,7 +77,7 @@ export const WrappedInviterPreview: React.FC<WrappedInviterProps> = ({
const [user, setUser] = useState<User | undefined>(undefined); const [user, setUser] = useState<User | undefined>(undefined);
const hss = useHSs(link); const hss = useHSs(link);
useEffect(() => { useEffect(() => {
if (hss) { if (hss.length) {
client(hss[0]) client(hss[0])
.then((c) => getUserDetails(c, link.identifier)) .then((c) => getUserDetails(c, link.identifier))
.then(setUser) .then(setUser)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment