Skip to content

Commit

Permalink
Block List HOC: Ensure className is preserved (#14738)
Browse files Browse the repository at this point in the history
As the HOC was used as part of a filter, the className was getting set
by the last filter that was run. This was a lucky accident for OpenTable
as it meant that it wasn't affected by the bug being fixed in #14732

This change passes through the className prop when the block names don't
match, which means that if it's been set by a previous filter, it is
preserved.
  • Loading branch information
pablinos authored Feb 24, 2020
1 parent d498796 commit 714b918
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default name =>
BlockListBlock => props => (
<BlockListBlock
{ ...props }
className={ props.name === name ? 'has-warning is-interactive' : '' }
className={ props.name === name ? 'has-warning is-interactive' : props.className }
/>
),
'withHasWarningIsInteractiveClassNames'
Expand Down

0 comments on commit 714b918

Please sign in to comment.