فهرست منبع

fix: context access for is porter user

Soham Parekh 3 سال پیش
والد
کامیت
6f9ec1767f
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"