| 2157 | /** @type {HTMLElement} */ | 2157 | /** @type {HTMLElement} */ |
| 2158 | const content = drawer.querySelector(':scope > .inline-drawer-content'); | 2158 | const content = drawer.querySelector(':scope > .inline-drawer-content'); |
| 2159 | | 2159 | |
| | 2160 | if (!icon || !content) { |
| | 2161 | console.debug('toggleDrawer: No icon or content found in the drawer element.'); |
| | 2162 | return; |
| | 2163 | } |
| | 2164 | |
| 2160 | if (expand) { | 2165 | if (expand) { |
| 2161 | icon.classList.remove('down', 'fa-circle-chevron-down'); | 2166 | icon.classList.remove('down', 'fa-circle-chevron-down'); |
| 2162 | icon.classList.add('up', 'fa-circle-chevron-up'); | 2167 | icon.classList.add('up', 'fa-circle-chevron-up'); |