Skip to content

Commit

Permalink
Changed condition to attribute name. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
NicBonetto committed Oct 28, 2017
1 parent 9fc2b7f commit ede38f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/__tests__/ReactDOMComponent-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2287,8 +2287,8 @@ describe('ReactDOMComponent', () => {
expectDev(console.error.calls.count()).toBe(1);
expectDev(console.error.calls.argsFor(0)[0]).toContain(
'Received `false` for non-boolean attribute `whatever`. If you mean to conditionally ' +
'pass an attribute, use a ternary expression: {condition ? `whatever` : undefined} ' +
'instead of {condition && `whatever`}.',
'pass an attribute, use a ternary expression: {`whatever` ? value : undefined} ' +
'instead of {`whatever` && value}.',
);
});
});
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/src/shared/ReactDOMUnknownPropertyHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ if (__DEV__) {
warning(
false,
'Received `%s` for non-boolean attribute `%s`. If you mean to conditionally ' +
'pass an attribute, use a ternary expression: {condition ? `%s` : undefined} ' +
'instead of {condition && `%s`}.%s',
'pass an attribute, use a ternary expression: {`%s` ? value : undefined} ' +
'instead of {`%s` && value}.%s',
value,
name,
name,
Expand Down

0 comments on commit ede38f3

Please sign in to comment.