Browse Source

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

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 year ago
parent
commit
72d2c377fc
1 changed files with 3 additions and 1 deletions
  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}`}>