瀏覽代碼

控制台报错

CzRger 5 天之前
父節點
當前提交
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)