瀏覽代碼

Avoid onboarding call if projec_id is undefined

jnfrati 4 年之前
父節點
當前提交
f25e2044f2
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      dashboard/src/main/home/Home.tsx

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

@@ -228,6 +228,9 @@ class Home extends Component<PropsType, StateType> {
   async checkOnboarding() {
   async checkOnboarding() {
     try {
     try {
       const project_id = this.context?.currentProject?.id;
       const project_id = this.context?.currentProject?.id;
+      if (!project_id) {
+        return;
+      }
       const res = await api.getOnboardingState("<token>", {}, { project_id });
       const res = await api.getOnboardingState("<token>", {}, { project_id });
 
 
       if (res.status === 404) {
       if (res.status === 404) {