Pārlūkot izejas kodu

Fix failing test due to timing issue

JC Brand 5 gadi atpakaļ
vecāks
revīzija
cca5c17ccb
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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 () {