File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
7
7
8
8
## [ Unreleased]
9
+ ### Fixed
10
+ - Don't render hook steps with no content ([ #361 ] ( https://github.com/cucumber/react-components/pull/361 ) )
9
11
10
12
## [ 22.3.0] - 2024-08-02
11
13
### Added
Original file line number Diff line number Diff line change @@ -10,11 +10,12 @@ interface IProps {
10
10
export const HookSteps : React . FunctionComponent < IProps > = ( { hookSteps } ) => {
11
11
return (
12
12
< >
13
- { hookSteps . map ( ( step , index ) => (
14
- < li key = { index } >
15
- < HookStep key = { index } step = { step } />
16
- </ li >
17
- ) ) }
13
+ { hookSteps
14
+ . map ( ( step , index ) => < HookStep key = { index } step = { step } /> )
15
+ . filter ( ( el ) => ! ! el . props . children ?. length )
16
+ . map ( ( el , index ) => (
17
+ < li key = { index } > { el } </ li >
18
+ ) ) }
18
19
</ >
19
20
)
20
21
}
You can’t perform that action at this time.
0 commit comments