Skip to content

Commit

Permalink
Storybook: Fix crash when parameters is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Dec 20, 2022
1 parent 69b2830 commit d2ec9ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion storybook/webpack/source-link-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ function alterParameters( properties, componentPath ) {

if ( ! parameters ) {
parameters = babel.types.objectProperty(
babel.types.identifier( 'parameters' )
babel.types.identifier( 'parameters' ),
babel.types.objectExpression( [] )
);
properties.push( parameters );
}
Expand Down

1 comment on commit d2ec9ce

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3739614669
📝 Reported issues:

Please sign in to comment.