mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-12-25 21:54:20 -08:00
linting and fix bug when multiple accordions open in single section
This commit is contained in:
parent
97e9485040
commit
bed46b5c79
|
@ -49,7 +49,7 @@ const findNearestHeading = (element: Element): Element | null => {
|
|||
*/
|
||||
const updateUrlWithNearestHeadingId = (targetElementUuid: string): void => {
|
||||
const targetElement: HTMLElement | null = document.getElementById(
|
||||
`accordion__heading-${targetElementUuid}`,
|
||||
`accordion__heading-${targetElementUuid[0]}`,
|
||||
);
|
||||
|
||||
const nearestHeading: Element | null = targetElement
|
||||
|
@ -63,7 +63,7 @@ const updateUrlWithNearestHeadingId = (targetElementUuid: string): void => {
|
|||
|
||||
// If they're all collapsed, remove the hash
|
||||
if (!targetElement) {
|
||||
window.location.hash = '';
|
||||
window.location.hash = "";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue