mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[reconciler] ReactFiberNewContext import maxSigned31BitInt twice (#13857)
* [reconciler] ReactFiberNewContext import maxSigned31BitInt twice * rename maxSigned31BitInt to MAX_SIGNED_31_BIT_INT
This commit is contained in:
1 parent
409e472fca
commit
04c4f2fcea
1 file changed
+3
-4
+3
-4
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user