Skip to content

Commit

Permalink
refactor: remove explict handle of default case
Browse files Browse the repository at this point in the history
  • Loading branch information
phanshiyu committed Apr 22, 2024
1 parent a36f384 commit 0ea2941
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/renderer/SvgRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ const SvgRenderer = React.forwardRef<HTMLImageElement, SvgRendererProps>(
switch (toDisplay.status) {
case "LOADING":
return loadingComponent ? <>{loadingComponent}</> : null;
case "DEFAULT":
return <NoTemplate document={document} handleObfuscation={() => null} />;

case "MALFORMED_SVG_ERROR":
return (
<DefaultTemplate
Expand Down Expand Up @@ -214,7 +213,7 @@ const SvgRenderer = React.forwardRef<HTMLImageElement, SvgRendererProps>(
/>
);
default:
return <></>;
return <NoTemplate document={document} handleObfuscation={() => null} />;
}
}
);
Expand Down

0 comments on commit 0ea2941

Please sign in to comment.