소스 검색

控制台报错

CzRger 2 주 전
부모
커밋
287999c87a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      web/context/provider-context.tsx

+ 2 - 2
web/context/provider-context.tsx

@@ -114,8 +114,8 @@ export const ProviderContextProvider = ({
     const data = await fetchCurrentPlanInfo()
     const enabled = data.billing.enabled
     setEnableBilling(enabled)
-    setEnableEducationPlan(data.education.enabled)
-    setIsEducationWorkspace(data.education.activated)
+    setEnableEducationPlan(data.education?.enabled)
+    setIsEducationWorkspace(data.education?.activated)
     setEnableReplaceWebAppLogo(data.can_replace_logo)
     if (enabled) {
       setPlan(parseCurrentPlan(data) as any)