فهرست منبع

Prevent request if project id is undefined or falsy

jnfrati 4 سال پیش
والد
کامیت
69be065e3c
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      dashboard/src/main/home/Home.tsx

+ 3 - 0
dashboard/src/main/home/Home.tsx

@@ -294,6 +294,9 @@ class Home extends Component<PropsType, StateType> {
   }
 
   async checkIfProjectHasBilling(projectId: number) {
+    if (!projectId) {
+      return false;
+    }
     try {
       const res = await api.getHasBilling(
         "<token>",