mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Fix obscure error in useToggles
This commit is contained in:
@@ -325,7 +325,8 @@ function useToggles() {
|
||||
}
|
||||
|
||||
const isToggled = (key: string) => {
|
||||
return toggleState?.get(key) ?? toggleAll
|
||||
if (!(toggleState instanceof Map)) return false
|
||||
return toggleState.get(key) ?? toggleAll
|
||||
}
|
||||
|
||||
return { expand, collapse, isToggled }
|
||||
|
||||
Reference in New Issue
Block a user