Ver Fonte

fix: home page is loading forever if the db has no collections (#589)

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang há 1 ano atrás
pai
commit
72d2c377fc
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      client/src/pages/home/Home.tsx

+ 3 - 1
client/src/pages/home/Home.tsx

@@ -79,7 +79,9 @@ const Home = () => {
   }, [data.rootCoord]);
 
   // make sure the database has collections data
-  const isLoading = loadingDatabases || collections.every(c => !c.schema);
+  const isLoading =
+    loadingDatabases ||
+    (collections.length > 0 && collections.every(c => !c.schema));
 
   return (
     <section className={`page-wrapper  ${classes.overviewContainer}`}>