We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 133a4b5 commit 26d7822Copy full SHA for 26d7822
1 file changed
packages/react-reconciler/src/ReactFiberContext.js
@@ -134,12 +134,12 @@ function hasContextChanged(): boolean {
134
}
135
136
function isContextProvider(type: Function): boolean {
137
- const childContextTypes = type.childContextTypes;
138
- const hasChildContextTypes =
139
- childContextTypes !== null && childContextTypes !== undefined;
140
if (disableLegacyContext) {
141
return false;
142
} else {
+ const childContextTypes = type.childContextTypes;
+ const hasChildContextTypes =
+ childContextTypes !== null && childContextTypes !== undefined;
143
return hasChildContextTypes;
144
145
0 commit comments