Skip to content

Commit

Permalink
Remove enableFilterEmptyStringAttributesDOM (#31765)
Browse files Browse the repository at this point in the history
Base off #31764

This has landed everywhere

DiffTrain build for [4996a8f](4996a8f)
  • Loading branch information
rickhanlonii committed Dec 13, 2024
1 parent b80e295 commit ed63850
Show file tree
Hide file tree
Showing 23 changed files with 146 additions and 158 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.1.0-native-fb-3ad17ecd-20241213
19.1.0-native-fb-4996a8fa-20241213
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b26bed9dabe71dce6d9cd996ad54622c>>
* @generated SignedSource<<314020efbba006ecd14bc1c1bdc7f652>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-3ad17ecd-20241213";
exports.version = "19.1.0-native-fb-4996a8fa-20241213";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7075c20779eb1ff45a225ecfc634021e>>
* @generated SignedSource<<0b3d2329f351915c3d76e5fd60256486>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-3ad17ecd-20241213";
exports.version = "19.1.0-native-fb-4996a8fa-20241213";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7075c20779eb1ff45a225ecfc634021e>>
* @generated SignedSource<<0b3d2329f351915c3d76e5fd60256486>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-3ad17ecd-20241213";
exports.version = "19.1.0-native-fb-4996a8fa-20241213";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<02c49e871b2dac43816ab6ccfc9a5544>>
* @generated SignedSource<<46966fcc4d7ba85bcb36042400ef13ed>>
*/

/*
Expand Down Expand Up @@ -19689,42 +19689,36 @@ __DEV__ &&
}
case "src":
case "href":
if (
!(
"" !== propKey ||
("a" === tag && "href" === value) ||
("object" === tag && "data" === value)
)
) {
"src" === value
? error$jscomp$0(
'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
)
: error$jscomp$0(
'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
);
hydrateSanitizedAttribute(
domElement,
value,
value,
null,
extraAttributes,
serverDifferences
);
continue;
}
hydrateSanitizedAttribute(
domElement,
value,
value,
propKey,
extraAttributes,
serverDifferences
);
"" !== propKey ||
("a" === tag && "href" === value) ||
("object" === tag && "data" === value)
? hydrateSanitizedAttribute(
domElement,
value,
value,
propKey,
extraAttributes,
serverDifferences
)
: ("src" === value
? error$jscomp$0(
'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
)
: error$jscomp$0(
'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
),
hydrateSanitizedAttribute(
domElement,
value,
value,
null,
extraAttributes,
serverDifferences
));
continue;
case "action":
case "formAction":
Expand Down Expand Up @@ -25898,11 +25892,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-3ad17ecd-20241213" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-4996a8fa-20241213" !== 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.1.0-native-fb-3ad17ecd-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-4996a8fa-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25939,10 +25933,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-3ad17ecd-20241213",
version: "19.1.0-native-fb-4996a8fa-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-3ad17ecd-20241213"
reconcilerVersion: "19.1.0-native-fb-4996a8fa-20241213"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26088,5 +26082,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-3ad17ecd-20241213";
exports.version = "19.1.0-native-fb-4996a8fa-20241213";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2c9ca489437718c32ad6d1d54f419fb4>>
* @generated SignedSource<<b85702b5d222b41685e84421633ce308>>
*/

/*
Expand Down Expand Up @@ -15869,14 +15869,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1722 = React.version;
if (
"19.1.0-native-fb-3ad17ecd-20241213" !==
"19.1.0-native-fb-4996a8fa-20241213" !==
isomorphicReactPackageVersion$jscomp$inline_1722
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1722,
"19.1.0-native-fb-3ad17ecd-20241213"
"19.1.0-native-fb-4996a8fa-20241213"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15898,10 +15898,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2177 = {
bundleType: 0,
version: "19.1.0-native-fb-3ad17ecd-20241213",
version: "19.1.0-native-fb-4996a8fa-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-3ad17ecd-20241213"
reconcilerVersion: "19.1.0-native-fb-4996a8fa-20241213"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2178 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16007,4 +16007,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-3ad17ecd-20241213";
exports.version = "19.1.0-native-fb-4996a8fa-20241213";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8d91ea0d6cd6b7af45c684853e50500a>>
* @generated SignedSource<<311a50e2e1b7a7f27a679edf407be5df>>
*/

/*
Expand Down Expand Up @@ -16522,14 +16522,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1812 = React.version;
if (
"19.1.0-native-fb-3ad17ecd-20241213" !==
"19.1.0-native-fb-4996a8fa-20241213" !==
isomorphicReactPackageVersion$jscomp$inline_1812
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1812,
"19.1.0-native-fb-3ad17ecd-20241213"
"19.1.0-native-fb-4996a8fa-20241213"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16551,10 +16551,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1819 = {
bundleType: 0,
version: "19.1.0-native-fb-3ad17ecd-20241213",
version: "19.1.0-native-fb-4996a8fa-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-3ad17ecd-20241213",
reconcilerVersion: "19.1.0-native-fb-4996a8fa-20241213",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16675,4 +16675,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-3ad17ecd-20241213";
exports.version = "19.1.0-native-fb-4996a8fa-20241213";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<09e52043c63ff1cf5b37b34434e006ad>>
* @generated SignedSource<<4f6ee068d3051d5d8758a82270cf2384>>
*/

/*
Expand Down Expand Up @@ -19701,42 +19701,36 @@ __DEV__ &&
}
case "src":
case "href":
if (
!(
"" !== propKey ||
("a" === tag && "href" === value) ||
("object" === tag && "data" === value)
)
) {
"src" === value
? error$jscomp$0(
'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
)
: error$jscomp$0(
'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
);
hydrateSanitizedAttribute(
domElement,
value,
value,
null,
extraAttributes,
serverDifferences
);
continue;
}
hydrateSanitizedAttribute(
domElement,
value,
value,
propKey,
extraAttributes,
serverDifferences
);
"" !== propKey ||
("a" === tag && "href" === value) ||
("object" === tag && "data" === value)
? hydrateSanitizedAttribute(
domElement,
value,
value,
propKey,
extraAttributes,
serverDifferences
)
: ("src" === value
? error$jscomp$0(
'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
)
: error$jscomp$0(
'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
value,
value
),
hydrateSanitizedAttribute(
domElement,
value,
value,
null,
extraAttributes,
serverDifferences
));
continue;
case "action":
case "formAction":
Expand Down Expand Up @@ -25959,11 +25953,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-3ad17ecd-20241213" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-4996a8fa-20241213" !== 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.1.0-native-fb-3ad17ecd-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-4996a8fa-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -26000,10 +25994,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-3ad17ecd-20241213",
version: "19.1.0-native-fb-4996a8fa-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-3ad17ecd-20241213"
reconcilerVersion: "19.1.0-native-fb-4996a8fa-20241213"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26465,7 +26459,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-3ad17ecd-20241213";
exports.version = "19.1.0-native-fb-4996a8fa-20241213";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit ed63850

Please sign in to comment.