🐛 eslint fix

This commit is contained in:
Daniel
2022-01-09 16:48:53 +05:30
parent 13a9b845af
commit e02f7cf5a8
3 changed files with 16 additions and 18 deletions

View File

@@ -47,16 +47,14 @@ interface Config {
class Treeview {
_element: HTMLElement
_config: Config
_navItem: HTMLElement | null
_childNavItem: HTMLElement | null | undefined
_navItem: HTMLElement | undefined
_childNavItem: HTMLElement | undefined | undefined
constructor(element: HTMLElement, config: Config) {
this._element = element
this._navItem = this._element?.closest(SELECTOR_NAV_ITEM)
this._childNavItem = this._navItem?.querySelector(SELECTOR_TREEVIEW_MENU)
this._config = { ...Default, ...config }
this._navItem = this._element?.closest(SELECTOR_NAV_ITEM) as HTMLElement | undefined
this._childNavItem = this._navItem?.querySelector(SELECTOR_TREEVIEW_MENU) as HTMLElement | undefined
}
open(): void {