Skip to content

Commit

Permalink
[CIVIC-1244] Updated flyout focus - filter out empty selector.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-cole committed Dec 7, 2023
1 parent 1d8a7dc commit 5f2726b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function CivicThemeFlyout(el) {
this.panel = this.el.querySelector('[data-flyout-panel]');
this.el.expanded = this.el.hasAttribute('data-flyout-expanded');
this.duration = this.el.hasAttribute('data-flyout-duration') ? parseInt(this.el.getAttribute('data-flyout-duration'), 10) : 500;
this.focus = this.el.hasAttribute('data-flyout-focus') ? this.el.getAttribute('data-flyout-focus').split(',') : false;
this.focus = this.el.hasAttribute('data-flyout-focus') ? this.el.getAttribute('data-flyout-focus').split(',').filter(i => i) : false;

// Add event listener to element.
if (this.openTrigger) {
Expand Down

0 comments on commit 5f2726b

Please sign in to comment.