From 684a4cb19ad547cf39785128fbbb02194a284ead Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 29 Sep 2020 16:10:44 +0100 Subject: [PATCH] Fix blank avatar on Safari --- src/components/Avatar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Avatar.tsx b/src/components/Avatar.tsx index 4dcffc9..adf99ac 100644 --- a/src/components/Avatar.tsx +++ b/src/components/Avatar.tsx @@ -35,7 +35,7 @@ interface IProps { const Avatar: React.FC = ({ className, avatarUrl, label }: IProps) => { const [src, setSrc] = useState(avatarUrl); useEffect(() => { - setSrc(avatarUrl); + setSrc(avatarUrl ? avatarUrl : logo); }, [avatarUrl]); const _className = classNames('avatar', className, {