Fix error when adding to list

This commit is contained in:
Misode
2021-09-25 18:53:43 +02:00
parent e7e9b02ea7
commit 6d6939163d

View File

@@ -302,7 +302,7 @@ function useToggles() {
}
const isToggled = (key: string) => {
return toggleState.get(key) ?? toggleAll
return toggleState?.get(key) ?? toggleAll
}
return { expand, collapse, isToggled }