-
Notifications
You must be signed in to change notification settings - Fork 49.8k
Fixed an issue with nested contexts unwinding when server rendering. Issue #12984 #12985
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
Changes from 1 commit
8ff3f62
27bb329
8d38f45
037c4d5
e69904c
731c686
6d31d3a
5114a3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -692,8 +692,8 @@ class ReactDOMServerRenderer { | |
| // find the correct previous provider based on type | ||
| let previousProvider; | ||
| if (this.providerIndex > -1) { | ||
|
||
| for (let i = 0; i <= this.providerIndex; i += 1) { | ||
| if (this.providerStack[i] && | ||
| for (let i = this.providerIndex; i >= 0; i -= 1) { | ||
|
||
| if (this.providerStack[i] !== null && this.providerStack[i] !== undefined && | ||
|
||
| (this.providerStack[i]: ReactProvider<any>).type === provider.type) { | ||
|
||
| previousProvider = this.providerStack[i]; | ||
| break; | ||
|
|
||
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 comment is redundant, IMO the code speaks for itself
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.
OK