Ver código fonte

fix: An empty island would render if no subtypes were registered.

Daniel J. Geiger 1 ano atrás
pai
commit
f71ded4bf9
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      src/components/Subtypes.tsx

+ 4 - 0
src/components/Subtypes.tsx

@@ -144,6 +144,10 @@ export const SubtypeToggles = () => {
     });
   };
 
+  // Only render if one or more subtypes are registered
+  if (getSubtypeNames().length === 0) {
+    return <></>;
+  }
   return (
     <>
       <Island