Skip to content

Commit df4b99c

Browse files
committed
Clean up empty string special cases (#28475)
This was fixed in #22807 so we don't need these special cases anymore. DiffTrain build for [bb4b147](bb4b147)
1 parent b45dfde commit df4b99c

14 files changed

+88
-164
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e7849b50bcefc0742ca342d70284d82cfcf990e5
1+
bb4b147da9a892529995f55f15f19f46a00cf4f6

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,4 +633,4 @@ exports.useSyncExternalStore = function (
633633
exports.useTransition = function () {
634634
return ReactCurrentDispatcher.current.useTransition();
635635
};
636-
exports.version = "18.3.0-www-classic-d4b2bc87";
636+
exports.version = "18.3.0-www-classic-46c2f9a3";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ exports.useSyncExternalStore = function (
637637
exports.useTransition = function () {
638638
return ReactCurrentDispatcher.current.useTransition();
639639
};
640-
exports.version = "18.3.0-www-classic-012fabe8";
640+
exports.version = "18.3.0-www-classic-4f385f77";
641641
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
642642
"function" ===
643643
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if (__DEV__) {
6666
return self;
6767
}
6868

69-
var ReactVersion = "18.3.0-www-modern-78796c31";
69+
var ReactVersion = "18.3.0-www-modern-0bd008ad";
7070

7171
var LegacyRoot = 0;
7272
var ConcurrentRoot = 1;

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8566,22 +8566,17 @@ if (__DEV__) {
85668566
}
85678567

85688568
var text = fiber.pendingProps;
8569-
var isHydratable = isHydratableText(text);
8570-
var shouldKeepWarning = true;
8571-
8572-
if (isHydratable) {
8573-
// Validate that this is ok to render here before any mismatches.
8574-
var currentHostContext = getHostContext();
8575-
shouldKeepWarning = validateHydratableTextInstance(
8576-
text,
8577-
currentHostContext
8578-
);
8579-
}
8569+
var shouldKeepWarning = true; // Validate that this is ok to render here before any mismatches.
85808570

8571+
var currentHostContext = getHostContext();
8572+
shouldKeepWarning = validateHydratableTextInstance(
8573+
text,
8574+
currentHostContext
8575+
);
85818576
var initialInstance = nextHydratableInstance;
85828577
var nextInstance = nextHydratableInstance;
85838578

8584-
if (!nextInstance || !isHydratable) {
8579+
if (!nextInstance) {
85858580
// We exclude non hydrabable text because we know there are no matching hydratables.
85868581
// We either throw or insert depending on the render mode.
85878582
if (shouldClientRenderOnMismatch(fiber)) {
@@ -36053,7 +36048,7 @@ if (__DEV__) {
3605336048
return root;
3605436049
}
3605536050

36056-
var ReactVersion = "18.3.0-www-classic-0bf4f6f1";
36051+
var ReactVersion = "18.3.0-www-classic-d2fdad5d";
3605736052

3605836053
function createPortal$1(
3605936054
children,
@@ -43787,14 +43782,6 @@ if (__DEV__) {
4378743782
}
4378843783
function warnForInsertedHydratedText(parentNode, text) {
4378943784
{
43790-
if (text === "") {
43791-
// We expect to insert empty text nodes since they're not represented in
43792-
// the HTML.
43793-
// TODO: Remove this special case if we can just avoid inserting empty
43794-
// text nodes.
43795-
return;
43796-
}
43797-
4379843785
if (didWarnInvalidHydration) {
4379943786
return;
4380043787
}
@@ -44652,9 +44639,6 @@ if (__DEV__) {
4465244639

4465344640
return;
4465444641
} // Making this so we can eventually move all of the instance caching to the commit phase.
44655-
function isHydratableText(text) {
44656-
return text !== "";
44657-
}
4465844642
function canHydrateInstance(instance, type, props, inRootOrSingleton) {
4465944643
while (instance.nodeType === ELEMENT_NODE) {
4466044644
var element = instance;

compiled/facebook-www/ReactDOM-dev.modern.js

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8517,22 +8517,17 @@ if (__DEV__) {
85178517
}
85188518

85198519
var text = fiber.pendingProps;
8520-
var isHydratable = isHydratableText(text);
8521-
var shouldKeepWarning = true;
8522-
8523-
if (isHydratable) {
8524-
// Validate that this is ok to render here before any mismatches.
8525-
var currentHostContext = getHostContext();
8526-
shouldKeepWarning = validateHydratableTextInstance(
8527-
text,
8528-
currentHostContext
8529-
);
8530-
}
8520+
var shouldKeepWarning = true; // Validate that this is ok to render here before any mismatches.
85318521

8522+
var currentHostContext = getHostContext();
8523+
shouldKeepWarning = validateHydratableTextInstance(
8524+
text,
8525+
currentHostContext
8526+
);
85328527
var initialInstance = nextHydratableInstance;
85338528
var nextInstance = nextHydratableInstance;
85348529

8535-
if (!nextInstance || !isHydratable) {
8530+
if (!nextInstance) {
85368531
// We exclude non hydrabable text because we know there are no matching hydratables.
85378532
// We either throw or insert depending on the render mode.
85388533
if (shouldClientRenderOnMismatch(fiber)) {
@@ -35889,7 +35884,7 @@ if (__DEV__) {
3588935884
return root;
3589035885
}
3589135886

35892-
var ReactVersion = "18.3.0-www-modern-8ea39922";
35887+
var ReactVersion = "18.3.0-www-modern-9166f5c5";
3589335888

3589435889
function createPortal$1(
3589535890
children,
@@ -44424,14 +44419,6 @@ if (__DEV__) {
4442444419
}
4442544420
function warnForInsertedHydratedText(parentNode, text) {
4442644421
{
44427-
if (text === "") {
44428-
// We expect to insert empty text nodes since they're not represented in
44429-
// the HTML.
44430-
// TODO: Remove this special case if we can just avoid inserting empty
44431-
// text nodes.
44432-
return;
44433-
}
44434-
4443544422
if (didWarnInvalidHydration) {
4443644423
return;
4443744424
}
@@ -45289,9 +45276,6 @@ if (__DEV__) {
4528945276

4529045277
return;
4529145278
} // Making this so we can eventually move all of the instance caching to the commit phase.
45292-
function isHydratableText(text) {
45293-
return text !== "";
45294-
}
4529545279
function canHydrateInstance(instance, type, props, inRootOrSingleton) {
4529645280
while (instance.nodeType === ELEMENT_NODE) {
4529745281
var element = instance;

compiled/facebook-www/ReactDOM-prod.classic.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11758,9 +11758,7 @@ beginWork = function (current, workInProgress, renderLanes) {
1175811758
return (
1175911759
null === current &&
1176011760
isHydrating &&
11761-
(((Component = "" !== workInProgress.pendingProps),
11762-
(current = renderLanes = nextHydratableInstance),
11763-
current && Component)
11761+
(((current = renderLanes = nextHydratableInstance), current)
1176411762
? tryHydrateText(workInProgress, current) ||
1176511763
(shouldClientRenderOnMismatch(workInProgress) &&
1176611764
throwOnHydrationMismatch(),
@@ -17229,10 +17227,10 @@ Internals.Events = [
1722917227
var devToolsConfig$jscomp$inline_1819 = {
1723017228
findFiberByHostInstance: getClosestInstanceFromNode,
1723117229
bundleType: 0,
17232-
version: "18.3.0-www-classic-ff9af76d",
17230+
version: "18.3.0-www-classic-90d46209",
1723317231
rendererPackageName: "react-dom"
1723417232
};
17235-
var internals$jscomp$inline_2179 = {
17233+
var internals$jscomp$inline_2178 = {
1723617234
bundleType: devToolsConfig$jscomp$inline_1819.bundleType,
1723717235
version: devToolsConfig$jscomp$inline_1819.version,
1723817236
rendererPackageName: devToolsConfig$jscomp$inline_1819.rendererPackageName,
@@ -17259,19 +17257,19 @@ var internals$jscomp$inline_2179 = {
1725917257
scheduleRoot: null,
1726017258
setRefreshHandler: null,
1726117259
getCurrentFiber: null,
17262-
reconcilerVersion: "18.3.0-www-classic-ff9af76d"
17260+
reconcilerVersion: "18.3.0-www-classic-90d46209"
1726317261
};
1726417262
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
17265-
var hook$jscomp$inline_2180 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
17263+
var hook$jscomp$inline_2179 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1726617264
if (
17267-
!hook$jscomp$inline_2180.isDisabled &&
17268-
hook$jscomp$inline_2180.supportsFiber
17265+
!hook$jscomp$inline_2179.isDisabled &&
17266+
hook$jscomp$inline_2179.supportsFiber
1726917267
)
1727017268
try {
17271-
(rendererID = hook$jscomp$inline_2180.inject(
17272-
internals$jscomp$inline_2179
17269+
(rendererID = hook$jscomp$inline_2179.inject(
17270+
internals$jscomp$inline_2178
1727317271
)),
17274-
(injectedHook = hook$jscomp$inline_2180);
17272+
(injectedHook = hook$jscomp$inline_2179);
1727517273
} catch (err) {}
1727617274
}
1727717275
assign(Internals, {
@@ -17602,4 +17600,4 @@ exports.useFormState = function (action, initialState, permalink) {
1760217600
exports.useFormStatus = function () {
1760317601
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
1760417602
};
17605-
exports.version = "18.3.0-www-classic-ff9af76d";
17603+
exports.version = "18.3.0-www-classic-90d46209";

compiled/facebook-www/ReactDOM-prod.modern.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11576,9 +11576,7 @@ beginWork = function (current, workInProgress, renderLanes) {
1157611576
return (
1157711577
null === current &&
1157811578
isHydrating &&
11579-
(((Component = "" !== workInProgress.pendingProps),
11580-
(current = renderLanes = nextHydratableInstance),
11581-
current && Component)
11579+
(((current = renderLanes = nextHydratableInstance), current)
1158211580
? tryHydrateText(workInProgress, current) ||
1158311581
(shouldClientRenderOnMismatch(workInProgress) &&
1158411582
throwOnHydrationMismatch(),
@@ -16745,10 +16743,10 @@ Internals.Events = [
1674516743
var devToolsConfig$jscomp$inline_1778 = {
1674616744
findFiberByHostInstance: getClosestInstanceFromNode,
1674716745
bundleType: 0,
16748-
version: "18.3.0-www-modern-7d36ed41",
16746+
version: "18.3.0-www-modern-2d6dd0ff",
1674916747
rendererPackageName: "react-dom"
1675016748
};
16751-
var internals$jscomp$inline_2143 = {
16749+
var internals$jscomp$inline_2142 = {
1675216750
bundleType: devToolsConfig$jscomp$inline_1778.bundleType,
1675316751
version: devToolsConfig$jscomp$inline_1778.version,
1675416752
rendererPackageName: devToolsConfig$jscomp$inline_1778.rendererPackageName,
@@ -16776,19 +16774,19 @@ var internals$jscomp$inline_2143 = {
1677616774
scheduleRoot: null,
1677716775
setRefreshHandler: null,
1677816776
getCurrentFiber: null,
16779-
reconcilerVersion: "18.3.0-www-modern-7d36ed41"
16777+
reconcilerVersion: "18.3.0-www-modern-2d6dd0ff"
1678016778
};
1678116779
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
16782-
var hook$jscomp$inline_2144 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
16780+
var hook$jscomp$inline_2143 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1678316781
if (
16784-
!hook$jscomp$inline_2144.isDisabled &&
16785-
hook$jscomp$inline_2144.supportsFiber
16782+
!hook$jscomp$inline_2143.isDisabled &&
16783+
hook$jscomp$inline_2143.supportsFiber
1678616784
)
1678716785
try {
16788-
(rendererID = hook$jscomp$inline_2144.inject(
16789-
internals$jscomp$inline_2143
16786+
(rendererID = hook$jscomp$inline_2143.inject(
16787+
internals$jscomp$inline_2142
1679016788
)),
16791-
(injectedHook = hook$jscomp$inline_2144);
16789+
(injectedHook = hook$jscomp$inline_2143);
1679216790
} catch (err) {}
1679316791
}
1679416792
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
@@ -17047,4 +17045,4 @@ exports.useFormState = function (action, initialState, permalink) {
1704717045
exports.useFormStatus = function () {
1704817046
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
1704917047
};
17050-
exports.version = "18.3.0-www-modern-7d36ed41";
17048+
exports.version = "18.3.0-www-modern-2d6dd0ff";

compiled/facebook-www/ReactDOM-profiling.classic.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12493,9 +12493,7 @@ beginWork = function (current, workInProgress, renderLanes) {
1249312493
return (
1249412494
null === current &&
1249512495
isHydrating &&
12496-
(((Component = "" !== workInProgress.pendingProps),
12497-
(current = renderLanes = nextHydratableInstance),
12498-
current && Component)
12496+
(((current = renderLanes = nextHydratableInstance), current)
1249912497
? tryHydrateText(workInProgress, current) ||
1250012498
(shouldClientRenderOnMismatch(workInProgress) &&
1250112499
throwOnHydrationMismatch(),
@@ -17998,7 +17996,7 @@ Internals.Events = [
1799817996
var devToolsConfig$jscomp$inline_1904 = {
1799917997
findFiberByHostInstance: getClosestInstanceFromNode,
1800017998
bundleType: 0,
18001-
version: "18.3.0-www-classic-316d7d0d",
17999+
version: "18.3.0-www-classic-124c1c92",
1800218000
rendererPackageName: "react-dom"
1800318001
};
1800418002
(function (internals) {
@@ -18042,7 +18040,7 @@ var devToolsConfig$jscomp$inline_1904 = {
1804218040
scheduleRoot: null,
1804318041
setRefreshHandler: null,
1804418042
getCurrentFiber: null,
18045-
reconcilerVersion: "18.3.0-www-classic-316d7d0d"
18043+
reconcilerVersion: "18.3.0-www-classic-124c1c92"
1804618044
});
1804718045
assign(Internals, {
1804818046
ReactBrowserEventEmitter: {
@@ -18372,7 +18370,7 @@ exports.useFormState = function (action, initialState, permalink) {
1837218370
exports.useFormStatus = function () {
1837318371
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
1837418372
};
18375-
exports.version = "18.3.0-www-classic-316d7d0d";
18373+
exports.version = "18.3.0-www-classic-124c1c92";
1837618374
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1837718375
"function" ===
1837818376
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactDOM-profiling.modern.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12305,9 +12305,7 @@ beginWork = function (current, workInProgress, renderLanes) {
1230512305
return (
1230612306
null === current &&
1230712307
isHydrating &&
12308-
(((Component = "" !== workInProgress.pendingProps),
12309-
(current = renderLanes = nextHydratableInstance),
12310-
current && Component)
12308+
(((current = renderLanes = nextHydratableInstance), current)
1231112309
? tryHydrateText(workInProgress, current) ||
1231212310
(shouldClientRenderOnMismatch(workInProgress) &&
1231312311
throwOnHydrationMismatch(),
@@ -17508,7 +17506,7 @@ Internals.Events = [
1750817506
var devToolsConfig$jscomp$inline_1863 = {
1750917507
findFiberByHostInstance: getClosestInstanceFromNode,
1751017508
bundleType: 0,
17511-
version: "18.3.0-www-modern-78796c31",
17509+
version: "18.3.0-www-modern-0bd008ad",
1751217510
rendererPackageName: "react-dom"
1751317511
};
1751417512
(function (internals) {
@@ -17553,7 +17551,7 @@ var devToolsConfig$jscomp$inline_1863 = {
1755317551
scheduleRoot: null,
1755417552
setRefreshHandler: null,
1755517553
getCurrentFiber: null,
17556-
reconcilerVersion: "18.3.0-www-modern-78796c31"
17554+
reconcilerVersion: "18.3.0-www-modern-0bd008ad"
1755717555
});
1755817556
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
1755917557
exports.createPortal = function (children, container) {
@@ -17811,7 +17809,7 @@ exports.useFormState = function (action, initialState, permalink) {
1781117809
exports.useFormStatus = function () {
1781217810
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
1781317811
};
17814-
exports.version = "18.3.0-www-modern-78796c31";
17812+
exports.version = "18.3.0-www-modern-0bd008ad";
1781517813
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1781617814
"function" ===
1781717815
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)