Skip to content

Commit

Permalink
[reconciler] ReactFiberNewContext import maxSigned31BitInt twice (#13857
Browse files Browse the repository at this point in the history
)

* [reconciler] ReactFiberNewContext import maxSigned31BitInt twice

* rename maxSigned31BitInt to MAX_SIGNED_31_BIT_INT
  • Loading branch information
yongningfu authored and nhunzaker committed Oct 22, 2018
1 parent 409e472 commit 04c4f2f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/react-reconciler/src/ReactFiberNewContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type ContextDependency<T> = {
import warningWithoutStack from 'shared/warningWithoutStack';
import {isPrimaryRenderer} from './ReactFiberHostConfig';
import {createCursor, push, pop} from './ReactFiberStack';
import maxSigned31BitInt from './maxSigned31BitInt';
import MAX_SIGNED_31_BIT_INT from './maxSigned31BitInt';
import {NoWork} from './ReactFiberExpirationTime';
import {ContextProvider, ClassComponent} from 'shared/ReactWorkTags';

Expand All @@ -33,7 +33,6 @@ import {
ForceUpdate,
} from 'react-reconciler/src/ReactUpdateQueue';

import MAX_SIGNED_31_BIT_INT from './maxSigned31BitInt';
const valueCursor: StackCursor<mixed> = createCursor(null);

let rendererSigil;
Expand Down Expand Up @@ -277,11 +276,11 @@ export function readContext<T>(
let resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.
if (
typeof observedBits !== 'number' ||
observedBits === maxSigned31BitInt
observedBits === MAX_SIGNED_31_BIT_INT
) {
// Observe all updates.
lastContextWithAllBitsObserved = ((context: any): ReactContext<mixed>);
resolvedObservedBits = maxSigned31BitInt;
resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
} else {
resolvedObservedBits = observedBits;
}
Expand Down

0 comments on commit 04c4f2f

Please sign in to comment.