ソースを参照

Prevent request new policy document if project is unset

jnfrati 5 年 前
コミット
9449c99a0e
1 ファイル変更1 行追加1 行削除
  1. 1 1
      dashboard/src/shared/auth/AuthContext.tsx

+ 1 - 1
dashboard/src/shared/auth/AuthContext.tsx

@@ -16,7 +16,7 @@ const AuthProvider: React.FC = ({ children }) => {
 
   useEffect(() => {
     let isSubscribed = true;
-    if (!user) {
+    if (!user || !currentProject?.id) {
       setCurrentPolicy(null);
     } else {
       api