Skip to content

Commit

Permalink
Move checks inside
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Aug 1, 2019
1 parent 133a4b5 commit 26d7822
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-reconciler/src/ReactFiberContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ function hasContextChanged(): boolean {
}

function isContextProvider(type: Function): boolean {
const childContextTypes = type.childContextTypes;
const hasChildContextTypes =
childContextTypes !== null && childContextTypes !== undefined;
if (disableLegacyContext) {
return false;
} else {
const childContextTypes = type.childContextTypes;
const hasChildContextTypes =
childContextTypes !== null && childContextTypes !== undefined;
return hasChildContextTypes;
}
}
Expand Down

0 comments on commit 26d7822

Please sign in to comment.