浏览代码

Fix failing test due to timing issue

JC Brand 5 年之前
父节点
当前提交
cca5c17ccb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/components/dropdown.js

+ 2 - 2
src/components/dropdown.js

@@ -20,8 +20,8 @@ export class BaseDropdown extends CustomElement {
 
     hideMenu () {
         u.removeClass('show', this.menu);
-        this.button.setAttribute('aria-expanded', false);
-        this.button.blur();
+        this.button?.setAttribute('aria-expanded', false);
+        this.button?.blur();
     }
 
     showMenu () {