Skip to content

Commit

Permalink
fix(container): header bar assignment error (#4639)
Browse files Browse the repository at this point in the history
  • Loading branch information
romainseb authored Mar 16, 2023
1 parent 20f8526 commit 8c09dac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-adults-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/react-containers': patch
---

fix(HeaderBar): TypeError: Assignment to constant variable.
2 changes: 1 addition & 1 deletion packages/containers/src/HeaderBar/HeaderBar.connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Constants from './HeaderBar.constant';

const getHeaderActionProps = (actionName, ownProps, state) => {
const expression = get(ownProps, `${actionName}.renderIfExpression`);
const actionProps = null;
let actionProps = ownProps[actionName];

if (expression) {
actionProps = {
Expand Down
4 changes: 2 additions & 2 deletions packages/containers/src/HeaderBar/HeaderBar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ describe('Connected HeaderBar', () => {
const props = mapStateToProps(state, ownProps);

expect(props).toEqual({
callToAction: null,
genericAction: null,
callToAction: undefined,
genericAction: undefined,
productsItems: undefined,
});
});
Expand Down

0 comments on commit 8c09dac

Please sign in to comment.