From c7b768b88da9b4d89bf5c9bf4869bd5528e89b13 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 10 Apr 2022 13:25:10 -0500 Subject: [PATCH] SvgIcon: loader fallback --- app/soapbox/components/ui/icon/svg-icon.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/soapbox/components/ui/icon/svg-icon.tsx b/app/soapbox/components/ui/icon/svg-icon.tsx index 97d89ab62..5cb2dd192 100644 --- a/app/soapbox/components/ui/icon/svg-icon.tsx +++ b/app/soapbox/components/ui/icon/svg-icon.tsx @@ -29,7 +29,10 @@ const SvgIcon: React.FC = ({ src, alt, size = 24, className }): JSX.El height={size} loader={loader} data-testid='svg-icon' - /> + > + /* If the fetch fails, fall back to displaying the loader */ + {loader} + ); };