Browse Source

fix: remove warnings

ascarbek 2 years ago
parent
commit
557a524648

+ 2 - 1
frontend/appflowy_tauri/src/appflowy_app/components/_shared/database-hooks/useCell.ts

@@ -30,7 +30,8 @@ export const useCell = (cellIdentifier: CellIdentifier, cellCache: CellCache, fi
       },
     });
 
-    cellController.getCellData();
+    // ignore the return value, because we are using the subscription
+    void cellController.getCellData();
   };
 
   return {

+ 1 - 1
frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/cell/cell_controller.ts

@@ -55,7 +55,7 @@ export class CellController<T, D> {
     });
   }
 
-  subscribeChanged = async (callbacks: Callbacks<T>) => {
+  subscribeChanged = (callbacks: Callbacks<T>) => {
     this.subscribeCallbacks = callbacks;
     this.cellDataNotifier.observer.subscribe((cellData) => {
       if (cellData !== null) {