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)