Skip to content

Commit

Permalink
Add 'auto' condition to toggleOverflowX
Browse files Browse the repository at this point in the history
  • Loading branch information
renintw committed Oct 16, 2023
1 parent ea6c3be commit b5bb9ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mu-plugins/blocks/query-filter/src/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ function toggleOverflowX() {
if ( filtersElement ) {
const currentOverflowX = window.getComputedStyle( filtersElement ).overflowX;

if ( currentOverflowX === 'hidden' ) {
if ( 'hidden' === currentOverflowX ) {
filtersElement.style.overflowX = 'scroll';
} else if ( currentOverflowX === 'scroll' ) {
} else if ( 'scroll' === currentOverflowX || 'auto' === currentOverflowX ) {
filtersElement.style.overflowX = 'hidden';
}
}
Expand Down

0 comments on commit b5bb9ef

Please sign in to comment.