Skip to content

Commit

Permalink
Reword comment
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart committed Feb 2, 2023
1 parent ae4a680 commit 0657420
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/interface/src/components/complementary-area/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ function ComplementaryArea( {
} = useDispatch( interfaceStore );

useEffect( () => {
// Set initial visibility: For large screens, enable if it's active by
// default. For small screens, always initially disable.
if ( isActiveByDefault && activeArea === undefined && ! isSmall ) {
enableComplementaryArea( scope, identifier );
} else if ( activeArea === undefined && isSmall ) {
// The isComplementaryAreaVisible state is preserved, so in case it
// was previously true, we need to adjust and initially disable for
// small screens.
disableComplementaryArea( scope, identifier );
}
}, [
Expand Down

0 comments on commit 0657420

Please sign in to comment.