Fix grammar in warning message
Ben Alpert committed
Mar 11, 2015 at 15:47 UTC
f8672c727018264d064b580afb5065f941d5fd7f
2 files changed
+2
-2
src/classic/element/ReactElementValidator.js
+1
-1
@@ -250,7 +250,7 @@ function checkPropTypes(componentName, propTypes, props, location) {
250
warning(
251
!error || error instanceof Error,
252
'%s: type specification of %s `%s` is invalid; the type checker ' +
253
- 'function must return `null` or an `Error`, but returned a %s. ' +
253
+ 'function must return `null` or an `Error` but returned a %s. ' +
254
'You may have forgotten to pass an argument to the type checker ' +
255
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
256
'shape all require an argument).',
src/classic/element/__tests__/ReactElementValidator-test.js
+1
-1
@@ -381,7 +381,7 @@ describe('ReactElementValidator', function() {
381
expect(console.warn.calls.length).toBe(1);
382
expect(console.warn.calls[0].args[0]).toBe(
383
'Warning: Component: type specification of prop `myProp` is invalid; ' +
384
- 'the type checker function must return `null` or an `Error`, but ' +
384
+ 'the type checker function must return `null` or an `Error` but ' +
385
'returned a function. You may have forgotten to pass an argument to ' +
386
'the type checker creator (arrayOf, instanceOf, objectOf, oneOf, ' +
387
'oneOfType, and shape all require an argument).'