diff --git a/src/app/schema/renderHtml.tsx b/src/app/schema/renderHtml.tsx
index a3d4b916..5d8809d0 100644
--- a/src/app/schema/renderHtml.tsx
+++ b/src/app/schema/renderHtml.tsx
@@ -302,7 +302,7 @@ function useToggles() {
}
const isToggled = (key: string) => {
- return toggleState.get(key) ?? toggleAll
+ return toggleState?.get(key) ?? toggleAll
}
return { expand, collapse, isToggled }