mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
react-hooks/rules-of-hooks: Add support for do/while loops (#28714)
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.
Before submitting a pull request, please make sure the following is
done:
1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
10. If you haven't already, complete the CLA.
Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->
## Summary
<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->
Currently, `react-hooks/rules-of-hooks` does not support `do/while`
loops - I've also reported this in
https://github.com/facebook/react/issues/28713.
This PR takes a stab at adding support for `do/while` by following the
same logic we already have for detecting `while` loops.
After this PR, any hooks called inside a `do/while` loop will be
considered invalid.
We're also adding some unit tests to confirm that the behavior is
working as expected.
Fixes #28713.
## How did you test this change?
<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
If you leave this empty, your PR will very likely be closed.
-->
I've added unit tests that cover the case and verified that they pass by
running:
```
yarn test packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js --watch
```
I've also verified that the rest of the tests continue to pass by
running:
```
yarn test
```
and
```
yarn test --prod
```
DiffTrain build for [9daabc0bf9](https://github.com/facebook/react/commit/9daabc0bf97805be23f6131be4d84d063a3ff446)
This commit is contained in:
@@ -1 +1 @@
|
||||
b8ae38f88b70f8a0ea96421a4355266aafefee7f
|
||||
9daabc0bf97805be23f6131be4d84d063a3ff446
|
||||
|
||||
@@ -1 +1 @@
|
||||
b8ae38f88b70f8a0ea96421a4355266aafefee7f
|
||||
9daabc0bf97805be23f6131be4d84d063a3ff446
|
||||
|
||||
@@ -2021,7 +2021,7 @@ __DEV__ &&
|
||||
exports.useTransition = function () {
|
||||
return resolveDispatcher().useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -2001,7 +2001,7 @@ __DEV__ &&
|
||||
exports.useTransition = function () {
|
||||
return resolveDispatcher().useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -824,4 +824,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
|
||||
@@ -820,4 +820,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
|
||||
@@ -828,7 +828,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -824,7 +824,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -17059,11 +17059,11 @@ __DEV__ &&
|
||||
(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-art",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -17097,7 +17097,7 @@ __DEV__ &&
|
||||
exports.Shape = Shape;
|
||||
exports.Surface = Surface;
|
||||
exports.Text = Text;
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -16502,11 +16502,11 @@ __DEV__ &&
|
||||
(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-art",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -16540,7 +16540,7 @@ __DEV__ &&
|
||||
exports.Shape = Shape;
|
||||
exports.Surface = Surface;
|
||||
exports.Text = Text;
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -10871,13 +10871,13 @@ var slice = Array.prototype.slice,
|
||||
})(React.Component);
|
||||
var internals$jscomp$inline_1474 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-art",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: function () {
|
||||
return null;
|
||||
},
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1475 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -10903,4 +10903,4 @@ exports.RadialGradient = RadialGradient;
|
||||
exports.Shape = TYPES.SHAPE;
|
||||
exports.Surface = Surface;
|
||||
exports.Text = Text;
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
|
||||
@@ -10385,13 +10385,13 @@ var slice = Array.prototype.slice,
|
||||
})(React.Component);
|
||||
var internals$jscomp$inline_1467 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-art",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: function () {
|
||||
return null;
|
||||
},
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1468 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -10417,4 +10417,4 @@ exports.RadialGradient = RadialGradient;
|
||||
exports.Shape = TYPES.SHAPE;
|
||||
exports.Surface = Surface;
|
||||
exports.Text = Text;
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
|
||||
@@ -27823,11 +27823,11 @@ __DEV__ &&
|
||||
: flushSyncErrorInBuildsThatSupportLegacyMode;
|
||||
(function () {
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-www-classic-b8ae38f8-20241018" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-www-classic-9daabc0b-20241022" !== isomorphicReactPackageVersion)
|
||||
throw Error(
|
||||
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
|
||||
(isomorphicReactPackageVersion +
|
||||
"\n - react-dom: 19.0.0-www-classic-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-dom: 19.0.0-www-classic-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
})();
|
||||
("function" === typeof Map &&
|
||||
@@ -27871,11 +27871,11 @@ __DEV__ &&
|
||||
!(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -28528,7 +28528,7 @@ __DEV__ &&
|
||||
exports.useFormStatus = function () {
|
||||
return resolveDispatcher().useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -26937,11 +26937,11 @@ __DEV__ &&
|
||||
return_targetInst = null;
|
||||
(function () {
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-www-modern-b8ae38f8-20241018" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-www-modern-9daabc0b-20241022" !== isomorphicReactPackageVersion)
|
||||
throw Error(
|
||||
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
|
||||
(isomorphicReactPackageVersion +
|
||||
"\n - react-dom: 19.0.0-www-modern-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-dom: 19.0.0-www-modern-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
})();
|
||||
("function" === typeof Map &&
|
||||
@@ -26984,11 +26984,11 @@ __DEV__ &&
|
||||
!(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -27593,7 +27593,7 @@ __DEV__ &&
|
||||
exports.useFormStatus = function () {
|
||||
return resolveDispatcher().useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -17456,14 +17456,14 @@ function getCrossOriginStringAs(as, input) {
|
||||
}
|
||||
var isomorphicReactPackageVersion$jscomp$inline_1781 = React.version;
|
||||
if (
|
||||
"19.0.0-www-classic-b8ae38f8-20241018" !==
|
||||
"19.0.0-www-classic-9daabc0b-20241022" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_1781
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_1781,
|
||||
"19.0.0-www-classic-b8ae38f8-20241018"
|
||||
"19.0.0-www-classic-9daabc0b-20241022"
|
||||
)
|
||||
);
|
||||
function flushSyncFromReconciler(fn) {
|
||||
@@ -17508,11 +17508,11 @@ Internals.Events = [
|
||||
];
|
||||
var internals$jscomp$inline_2294 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2295 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -17968,4 +17968,4 @@ exports.useFormState = function (action, initialState, permalink) {
|
||||
exports.useFormStatus = function () {
|
||||
return ReactSharedInternals.H.useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
|
||||
@@ -16827,14 +16827,14 @@ function getCrossOriginStringAs(as, input) {
|
||||
}
|
||||
var isomorphicReactPackageVersion$jscomp$inline_1752 = React.version;
|
||||
if (
|
||||
"19.0.0-www-modern-b8ae38f8-20241018" !==
|
||||
"19.0.0-www-modern-9daabc0b-20241022" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_1752
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_1752,
|
||||
"19.0.0-www-modern-b8ae38f8-20241018"
|
||||
"19.0.0-www-modern-9daabc0b-20241022"
|
||||
)
|
||||
);
|
||||
Internals.findDOMNode = function (componentOrElement) {
|
||||
@@ -16852,11 +16852,11 @@ Internals.Events = [
|
||||
];
|
||||
var internals$jscomp$inline_2286 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2287 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -17219,4 +17219,4 @@ exports.useFormState = function (action, initialState, permalink) {
|
||||
exports.useFormStatus = function () {
|
||||
return ReactSharedInternals.H.useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
|
||||
@@ -18178,14 +18178,14 @@ function getCrossOriginStringAs(as, input) {
|
||||
}
|
||||
var isomorphicReactPackageVersion$jscomp$inline_1874 = React.version;
|
||||
if (
|
||||
"19.0.0-www-classic-b8ae38f8-20241018" !==
|
||||
"19.0.0-www-classic-9daabc0b-20241022" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_1874
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_1874,
|
||||
"19.0.0-www-classic-b8ae38f8-20241018"
|
||||
"19.0.0-www-classic-9daabc0b-20241022"
|
||||
)
|
||||
);
|
||||
function flushSyncFromReconciler(fn) {
|
||||
@@ -18230,11 +18230,11 @@ Internals.Events = [
|
||||
];
|
||||
var internals$jscomp$inline_1881 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
enableSchedulingProfiler &&
|
||||
((internals$jscomp$inline_1881.getLaneLabelMap = getLaneLabelMap),
|
||||
@@ -18693,7 +18693,7 @@ exports.useFormState = function (action, initialState, permalink) {
|
||||
exports.useFormStatus = function () {
|
||||
return ReactSharedInternals.H.useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -17532,14 +17532,14 @@ function getCrossOriginStringAs(as, input) {
|
||||
}
|
||||
var isomorphicReactPackageVersion$jscomp$inline_1845 = React.version;
|
||||
if (
|
||||
"19.0.0-www-modern-b8ae38f8-20241018" !==
|
||||
"19.0.0-www-modern-9daabc0b-20241022" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_1845
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_1845,
|
||||
"19.0.0-www-modern-b8ae38f8-20241018"
|
||||
"19.0.0-www-modern-9daabc0b-20241022"
|
||||
)
|
||||
);
|
||||
Internals.findDOMNode = function (componentOrElement) {
|
||||
@@ -17557,11 +17557,11 @@ Internals.Events = [
|
||||
];
|
||||
var internals$jscomp$inline_1847 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
enableSchedulingProfiler &&
|
||||
((internals$jscomp$inline_1847.getLaneLabelMap = getLaneLabelMap),
|
||||
@@ -17927,7 +17927,7 @@ exports.useFormState = function (action, initialState, permalink) {
|
||||
exports.useFormStatus = function () {
|
||||
return ReactSharedInternals.H.useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -8991,5 +8991,5 @@ __DEV__ &&
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
})();
|
||||
|
||||
@@ -8809,5 +8809,5 @@ __DEV__ &&
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
})();
|
||||
|
||||
@@ -5914,4 +5914,4 @@ exports.renderToString = function (children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
|
||||
@@ -5826,4 +5826,4 @@ exports.renderToString = function (children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
|
||||
@@ -28157,11 +28157,11 @@ __DEV__ &&
|
||||
: flushSyncErrorInBuildsThatSupportLegacyMode;
|
||||
(function () {
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-www-classic-b8ae38f8-20241018" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-www-classic-9daabc0b-20241022" !== isomorphicReactPackageVersion)
|
||||
throw Error(
|
||||
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
|
||||
(isomorphicReactPackageVersion +
|
||||
"\n - react-dom: 19.0.0-www-classic-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-dom: 19.0.0-www-classic-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
})();
|
||||
("function" === typeof Map &&
|
||||
@@ -28205,11 +28205,11 @@ __DEV__ &&
|
||||
!(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -29028,5 +29028,5 @@ __DEV__ &&
|
||||
exports.useFormStatus = function () {
|
||||
return resolveDispatcher().useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
})();
|
||||
|
||||
@@ -27271,11 +27271,11 @@ __DEV__ &&
|
||||
return_targetInst = null;
|
||||
(function () {
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-www-modern-b8ae38f8-20241018" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-www-modern-9daabc0b-20241022" !== isomorphicReactPackageVersion)
|
||||
throw Error(
|
||||
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
|
||||
(isomorphicReactPackageVersion +
|
||||
"\n - react-dom: 19.0.0-www-modern-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-dom: 19.0.0-www-modern-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
})();
|
||||
("function" === typeof Map &&
|
||||
@@ -27318,11 +27318,11 @@ __DEV__ &&
|
||||
!(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -28093,5 +28093,5 @@ __DEV__ &&
|
||||
exports.useFormStatus = function () {
|
||||
return resolveDispatcher().useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
})();
|
||||
|
||||
@@ -17785,14 +17785,14 @@ function getCrossOriginStringAs(as, input) {
|
||||
}
|
||||
var isomorphicReactPackageVersion$jscomp$inline_1811 = React.version;
|
||||
if (
|
||||
"19.0.0-www-classic-b8ae38f8-20241018" !==
|
||||
"19.0.0-www-classic-9daabc0b-20241022" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_1811
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_1811,
|
||||
"19.0.0-www-classic-b8ae38f8-20241018"
|
||||
"19.0.0-www-classic-9daabc0b-20241022"
|
||||
)
|
||||
);
|
||||
function flushSyncFromReconciler(fn) {
|
||||
@@ -17837,11 +17837,11 @@ Internals.Events = [
|
||||
];
|
||||
var internals$jscomp$inline_2329 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2330 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -18448,4 +18448,4 @@ exports.useFormState = function (action, initialState, permalink) {
|
||||
exports.useFormStatus = function () {
|
||||
return ReactSharedInternals.H.useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
|
||||
@@ -17156,14 +17156,14 @@ function getCrossOriginStringAs(as, input) {
|
||||
}
|
||||
var isomorphicReactPackageVersion$jscomp$inline_1782 = React.version;
|
||||
if (
|
||||
"19.0.0-www-modern-b8ae38f8-20241018" !==
|
||||
"19.0.0-www-modern-9daabc0b-20241022" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_1782
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_1782,
|
||||
"19.0.0-www-modern-b8ae38f8-20241018"
|
||||
"19.0.0-www-modern-9daabc0b-20241022"
|
||||
)
|
||||
);
|
||||
Internals.findDOMNode = function (componentOrElement) {
|
||||
@@ -17181,11 +17181,11 @@ Internals.Events = [
|
||||
];
|
||||
var internals$jscomp$inline_2321 = {
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2322 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -17699,4 +17699,4 @@ exports.useFormState = function (action, initialState, permalink) {
|
||||
exports.useFormStatus = function () {
|
||||
return ReactSharedInternals.H.useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
|
||||
@@ -19270,7 +19270,7 @@ __DEV__ &&
|
||||
rendererPackageName: rendererPackageName,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
@@ -18661,7 +18661,7 @@ __DEV__ &&
|
||||
rendererPackageName: rendererPackageName,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
@@ -12903,7 +12903,7 @@ module.exports = function ($$$config) {
|
||||
rendererPackageName: rendererPackageName,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
@@ -12393,7 +12393,7 @@ module.exports = function ($$$config) {
|
||||
rendererPackageName: rendererPackageName,
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
@@ -14948,11 +14948,11 @@ __DEV__ &&
|
||||
(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-classic-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-classic-9daabc0b-20241022",
|
||||
rendererPackageName: "react-test-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -15087,5 +15087,5 @@ __DEV__ &&
|
||||
exports.unstable_batchedUpdates = function (fn, a) {
|
||||
return fn(a);
|
||||
};
|
||||
exports.version = "19.0.0-www-classic-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-classic-9daabc0b-20241022";
|
||||
})();
|
||||
|
||||
@@ -14948,11 +14948,11 @@ __DEV__ &&
|
||||
(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.0.0-www-modern-b8ae38f8-20241018",
|
||||
version: "19.0.0-www-modern-9daabc0b-20241022",
|
||||
rendererPackageName: "react-test-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018"
|
||||
reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -15087,5 +15087,5 @@ __DEV__ &&
|
||||
exports.unstable_batchedUpdates = function (fn, a) {
|
||||
return fn(a);
|
||||
};
|
||||
exports.version = "19.0.0-www-modern-b8ae38f8-20241018";
|
||||
exports.version = "19.0.0-www-modern-9daabc0b-20241022";
|
||||
})();
|
||||
|
||||
@@ -1 +1 @@
|
||||
19.0.0-www-classic-b8ae38f8-20241018
|
||||
19.0.0-www-classic-9daabc0b-20241022
|
||||
@@ -1 +1 @@
|
||||
19.0.0-www-modern-b8ae38f8-20241018
|
||||
19.0.0-www-modern-9daabc0b-20241022
|
||||
@@ -693,7 +693,7 @@
|
||||
pathHistory = new Set(pathHistory);
|
||||
if (pathHistory.has(segment.id)) {
|
||||
cache = Array.from(pathHistory);
|
||||
segment = cache.slice(cache.indexOf(segment.id) + 1);
|
||||
segment = cache.slice(cache.indexOf(segment.id) - 1);
|
||||
segment = _createForOfIteratorHelper(segment);
|
||||
var _step5;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user