Merge pull request #5184 from zpao/fix-style-issues

Fix indentation issues
This commit is contained in:
Paul O’Shannessy
2015-10-15 11:55:37 -07:00
6 changed files with 21 additions and 18 deletions
@@ -36,10 +36,10 @@ function forceUpdateIfMounted() {
function warnIfValueIsNull(props) {
if (props != null && props.value === null && !didWarnValueNull) {
warning(
false,
'`value` prop on `input` should not be null. ' +
'Consider using the empty string to clear the component or' +
' `undefined` for uncontrolled components.'
false,
'`value` prop on `input` should not be null. ' +
'Consider using the empty string to clear the component or `undefined` ' +
'for uncontrolled components.'
);
didWarnValueNull = true;
@@ -47,10 +47,10 @@ function getDeclarationErrorAddendum(owner) {
function warnIfValueIsNull(props) {
if (props != null && props.value === null && !didWarnValueNull) {
warning(
false,
'`value` prop on `select` should not be null. ' +
'Consider using the empty string to clear the component or' +
' `undefined` for uncontrolled components.'
false,
'`value` prop on `select` should not be null. ' +
'Consider using the empty string to clear the component or `undefined` ' +
'for uncontrolled components.'
);
didWarnValueNull = true;
@@ -32,10 +32,10 @@ function forceUpdateIfMounted() {
function warnIfValueIsNull(props) {
if (props != null && props.value === null && !didWarnValueNull) {
warning(
false,
'`value` prop on `textarea` should not be null. ' +
'Consider using the empty string to clear the component or' +
' `undefined` for uncontrolled components.'
false,
'`value` prop on `textarea` should not be null. ' +
'Consider using the empty string to clear the component or `undefined` ' +
'for uncontrolled components.'
);
didWarnValueNull = true;
@@ -407,8 +407,9 @@ describe('ReactDOMInput', function() {
it('should throw warning message if value is null', function() {
ReactTestUtils.renderIntoDocument(<input type="text" value={null} />);
expect(console.error.argsForCall[0][0]).toContain(
'`value` prop on `input` should not be null. Consider using the empty string to clear the component or'
+ ' `undefined` for uncontrolled components.'
'`value` prop on `input` should not be null. ' +
'Consider using the empty string to clear the component or `undefined` ' +
'for uncontrolled components.'
);
ReactTestUtils.renderIntoDocument(<input type="text" value={null} />);
@@ -469,8 +469,9 @@ describe('ReactDOMSelect', function() {
ReactTestUtils.renderIntoDocument(<select value={null}><option value="test"/></select>);
expect(console.error.argsForCall[0][0]).toContain(
'`value` prop on `select` should not be null. Consider using the empty string to clear the component or'
+ ' `undefined` for uncontrolled components.'
'`value` prop on `select` should not be null. ' +
'Consider using the empty string to clear the component or `undefined` ' +
'for uncontrolled components.'
);
ReactTestUtils.renderIntoDocument(<select value={null}><option value="test"/></select>);
@@ -271,8 +271,9 @@ describe('ReactDOMTextarea', function() {
ReactTestUtils.renderIntoDocument(<textarea value={null} />);
expect(console.error.argsForCall[0][0]).toContain(
'`value` prop on `textarea` should not be null. Consider using the empty string to clear the component or'
+ ' `undefined` for uncontrolled components.'
'`value` prop on `textarea` should not be null. ' +
'Consider using the empty string to clear the component or `undefined` ' +
'for uncontrolled components.'
);
ReactTestUtils.renderIntoDocument(<textarea value={null} />);