소스 검색

Revert changes to minimize diff

Diego Smania 3 달 전
부모
커밋
7e51eb06aa
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/ts/treeview.ts

+ 1 - 2
src/ts/treeview.ts

@@ -76,7 +76,6 @@ class Treeview {
     this._element.classList.add(CLASS_NAME_MENU_OPEN)
 
     const childElement = this._element?.querySelector(SELECTOR_TREEVIEW_MENU) as HTMLElement | undefined
-
     if (childElement) {
       slideDown(childElement, this._config.animationSpeed)
     }
@@ -86,10 +85,10 @@ class Treeview {
 
   close(): void {
     const event = new Event(EVENT_COLLAPSED)
-    const childElement = this._element?.querySelector(SELECTOR_TREEVIEW_MENU) as HTMLElement | undefined
 
     this._element.classList.remove(CLASS_NAME_MENU_OPEN)
 
+    const childElement = this._element?.querySelector(SELECTOR_TREEVIEW_MENU) as HTMLElement | undefined
     if (childElement) {
       slideUp(childElement, this._config.animationSpeed)
     }