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