-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added double newline delimiters to dynamically-populated warnings #8754
Conversation
I'll review after you find the others: #8719 (comment). |
@richiethomas Is this ready for review? |
@gaearon yes, just pushed the last of the newlines yesterday. |
@@ -44,7 +44,7 @@ var ReactNativeTagHandles = { | |||
assertRootTag: function(tag: number): void { | |||
invariant( | |||
this.reactTagIsNativeTopRootID(tag), | |||
'Expect a native root tag, instead got %s', tag | |||
'\n\nExpect a native root tag, instead got %s', tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right to me. It puts a newline before the whole message, not before the addendum.
(There is no addendum here.)
Also, I would prefer if we avoided modifying invariant
messages. Let’s stick to warning
s for now.
* 'beginLifeCycleTimer' function of ReactDebugTool.js * 'findDOMNode' function of findDOMNode.js * 'bindAutoBindMethod' function of ReactClass.js * 'warnNoop' function of ReactServerUpdateQueue.js * 'getInternalInstanceReadyForUpdate' function of ReactUpdateQueue.js * 'warnNoop' function of ReactNoopUpdateQueue.js * 'getDeclarationErrorAddendum' function of ReactDOMComponent.js * 'getSourceInfoErrorAddendum' function of ReactElementValidator.js * 'getDeclarationErrorAddendum' function of instantiateReactComponent.js and ReactElementValidator.js * 'traverseAllChildrenImpl' function of traverseAllChildren.js * 'attachRef' function of ReactRef.js * 'mountIndeterminateComponent' function of ReactFiberBeginWork.js * 'createFiberFromElementType' function of ReactFiber.js * 'getDeclarationErrorAddendum' function of ReactDOMSelect.js * 'unmountComponentAtNode' function of ReactMount.js * 'getDeclarationErrorAddendum' function of ReactControlledValuePropTypes.js * 'checkRenderMessage' function of CSSPropertyOperations.js * 'getDeclarationErrorAddendum' function of ReactDomFiberSelect.js * 'getCurrentComponentErrorInfo' function in 'ReactElementValidator' * 'getDeclarationErrorAddendum' function in ReactDOMFiberComponent.js
You don't need to close the PR—can just push a new commit on top. |
Right, sorry I keep forgetting. :) This PR removes the delimiters from all calls to 'invariant'. |
Fixes #8719
Before submitting a pull request, please make sure the following is done...
master
.npm test
).npm run lint
) - we've done our best to make sure these rules match our internal linting guidelines.