Просмотр исходного кода

Merge pull request #2657 from porter-dev/fix/context-access-for-is-porter-user

fix: context access for is porter user
jusrhee 3 лет назад
Родитель
Сommit
6d8f7443d6
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      dashboard/src/main/home/Home.tsx

+ 2 - 2
dashboard/src/main/home/Home.tsx

@@ -435,9 +435,9 @@ class Home extends Component<PropsType, StateType> {
                 return <Onboarding />;
               }}
             />
-            {this.context.user.isPorterUser ||
+            {this.context?.user?.isPorterUser ||
             overrideInfraTabEnabled({
-              projectID: this.context.currentProject.id,
+              projectID: this.context?.currentProject?.id,
             }) ? (
               <Route
                 path="/infrastructure"