mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Fizz] Check for nullish values on ReactCustomFormAction (#26770)
Usually we don't have to do this since we only set these in the loop but
the ReactCustomFormAction props are optional so they might be undefined.
Also moved it to a general type since it's a semi-public API.
DiffTrain build for [fa7a447b9c](https://github.com/facebook/react/commit/fa7a447b9ce5a4f0be592fc2946380b0fa3b29c0)
This commit is contained in:
@@ -1 +1 @@
|
||||
b7972822b5887d05ae772ef757a453265b4b7aec
|
||||
fa7a447b9ce5a4f0be592fc2946380b0fa3b29c0
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-7f904b45";
|
||||
var ReactVersion = "18.3.0-www-classic-e6e6835d";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -2885,23 +2885,23 @@ function pushFormActionAttribute(
|
||||
) {
|
||||
var formData = null;
|
||||
|
||||
if (name !== null) {
|
||||
if (name != null) {
|
||||
pushAttribute(target, "name", name);
|
||||
}
|
||||
|
||||
if (formAction !== null) {
|
||||
if (formAction != null) {
|
||||
pushAttribute(target, "formAction", formAction);
|
||||
}
|
||||
|
||||
if (formEncType !== null) {
|
||||
if (formEncType != null) {
|
||||
pushAttribute(target, "formEncType", formEncType);
|
||||
}
|
||||
|
||||
if (formMethod !== null) {
|
||||
if (formMethod != null) {
|
||||
pushAttribute(target, "formMethod", formMethod);
|
||||
}
|
||||
|
||||
if (formTarget !== null) {
|
||||
if (formTarget != null) {
|
||||
pushAttribute(target, "formTarget", formTarget);
|
||||
}
|
||||
|
||||
@@ -3560,19 +3560,19 @@ function pushStartForm(target, props, responseState) {
|
||||
}
|
||||
}
|
||||
|
||||
if (formAction !== null) {
|
||||
if (formAction != null) {
|
||||
pushAttribute(target, "action", formAction);
|
||||
}
|
||||
|
||||
if (formEncType !== null) {
|
||||
if (formEncType != null) {
|
||||
pushAttribute(target, "encType", formEncType);
|
||||
}
|
||||
|
||||
if (formMethod !== null) {
|
||||
if (formMethod != null) {
|
||||
pushAttribute(target, "method", formMethod);
|
||||
}
|
||||
|
||||
if (formTarget !== null) {
|
||||
if (formTarget != null) {
|
||||
pushAttribute(target, "target", formTarget);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-45591960";
|
||||
var ReactVersion = "18.3.0-www-modern-0f7d86b7";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -2885,23 +2885,23 @@ function pushFormActionAttribute(
|
||||
) {
|
||||
var formData = null;
|
||||
|
||||
if (name !== null) {
|
||||
if (name != null) {
|
||||
pushAttribute(target, "name", name);
|
||||
}
|
||||
|
||||
if (formAction !== null) {
|
||||
if (formAction != null) {
|
||||
pushAttribute(target, "formAction", formAction);
|
||||
}
|
||||
|
||||
if (formEncType !== null) {
|
||||
if (formEncType != null) {
|
||||
pushAttribute(target, "formEncType", formEncType);
|
||||
}
|
||||
|
||||
if (formMethod !== null) {
|
||||
if (formMethod != null) {
|
||||
pushAttribute(target, "formMethod", formMethod);
|
||||
}
|
||||
|
||||
if (formTarget !== null) {
|
||||
if (formTarget != null) {
|
||||
pushAttribute(target, "formTarget", formTarget);
|
||||
}
|
||||
|
||||
@@ -3560,19 +3560,19 @@ function pushStartForm(target, props, responseState) {
|
||||
}
|
||||
}
|
||||
|
||||
if (formAction !== null) {
|
||||
if (formAction != null) {
|
||||
pushAttribute(target, "action", formAction);
|
||||
}
|
||||
|
||||
if (formEncType !== null) {
|
||||
if (formEncType != null) {
|
||||
pushAttribute(target, "encType", formEncType);
|
||||
}
|
||||
|
||||
if (formMethod !== null) {
|
||||
if (formMethod != null) {
|
||||
pushAttribute(target, "method", formMethod);
|
||||
}
|
||||
|
||||
if (formTarget !== null) {
|
||||
if (formTarget != null) {
|
||||
pushAttribute(target, "target", formTarget);
|
||||
}
|
||||
|
||||
|
||||
@@ -310,11 +310,11 @@ function pushFormActionAttribute(
|
||||
formTarget,
|
||||
name
|
||||
) {
|
||||
null !== name && pushAttribute(target, "name", name);
|
||||
null !== formAction && pushAttribute(target, "formAction", formAction);
|
||||
null !== formEncType && pushAttribute(target, "formEncType", formEncType);
|
||||
null !== formMethod && pushAttribute(target, "formMethod", formMethod);
|
||||
null !== formTarget && pushAttribute(target, "formTarget", formTarget);
|
||||
null != name && pushAttribute(target, "name", name);
|
||||
null != formAction && pushAttribute(target, "formAction", formAction);
|
||||
null != formEncType && pushAttribute(target, "formEncType", formEncType);
|
||||
null != formMethod && pushAttribute(target, "formMethod", formMethod);
|
||||
null != formTarget && pushAttribute(target, "formTarget", formTarget);
|
||||
return null;
|
||||
}
|
||||
function pushAttribute(target, name, value) {
|
||||
@@ -1013,10 +1013,10 @@ function pushStartInstance(
|
||||
default:
|
||||
pushAttribute(target, name, propKey$jscomp$0);
|
||||
}
|
||||
null !== propValue && pushAttribute(target, "action", propValue);
|
||||
null !== resources && pushAttribute(target, "encType", resources);
|
||||
null !== selected && pushAttribute(target, "method", selected);
|
||||
null !== propValue$jscomp$0 &&
|
||||
null != propValue && pushAttribute(target, "action", propValue);
|
||||
null != resources && pushAttribute(target, "encType", resources);
|
||||
null != selected && pushAttribute(target, "method", selected);
|
||||
null != propValue$jscomp$0 &&
|
||||
pushAttribute(target, "target", propValue$jscomp$0);
|
||||
target.push(">");
|
||||
pushInnerHTML(target, textEmbedded, responseState);
|
||||
@@ -4002,4 +4002,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 = "18.3.0-www-classic-f0c37f65";
|
||||
exports.version = "18.3.0-www-classic-42ee674f";
|
||||
|
||||
@@ -309,11 +309,11 @@ function pushFormActionAttribute(
|
||||
formTarget,
|
||||
name
|
||||
) {
|
||||
null !== name && pushAttribute(target, "name", name);
|
||||
null !== formAction && pushAttribute(target, "formAction", formAction);
|
||||
null !== formEncType && pushAttribute(target, "formEncType", formEncType);
|
||||
null !== formMethod && pushAttribute(target, "formMethod", formMethod);
|
||||
null !== formTarget && pushAttribute(target, "formTarget", formTarget);
|
||||
null != name && pushAttribute(target, "name", name);
|
||||
null != formAction && pushAttribute(target, "formAction", formAction);
|
||||
null != formEncType && pushAttribute(target, "formEncType", formEncType);
|
||||
null != formMethod && pushAttribute(target, "formMethod", formMethod);
|
||||
null != formTarget && pushAttribute(target, "formTarget", formTarget);
|
||||
return null;
|
||||
}
|
||||
function pushAttribute(target, name, value) {
|
||||
@@ -1012,10 +1012,10 @@ function pushStartInstance(
|
||||
default:
|
||||
pushAttribute(target, name, propKey$jscomp$0);
|
||||
}
|
||||
null !== propValue && pushAttribute(target, "action", propValue);
|
||||
null !== resources && pushAttribute(target, "encType", resources);
|
||||
null !== selected && pushAttribute(target, "method", selected);
|
||||
null !== propValue$jscomp$0 &&
|
||||
null != propValue && pushAttribute(target, "action", propValue);
|
||||
null != resources && pushAttribute(target, "encType", resources);
|
||||
null != selected && pushAttribute(target, "method", selected);
|
||||
null != propValue$jscomp$0 &&
|
||||
pushAttribute(target, "target", propValue$jscomp$0);
|
||||
target.push(">");
|
||||
pushInnerHTML(target, textEmbedded, responseState);
|
||||
@@ -3900,4 +3900,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 = "18.3.0-www-modern-5e9b2f5f";
|
||||
exports.version = "18.3.0-www-modern-a116db68";
|
||||
|
||||
@@ -2892,23 +2892,23 @@ function pushFormActionAttribute(
|
||||
) {
|
||||
var formData = null;
|
||||
|
||||
if (name !== null) {
|
||||
if (name != null) {
|
||||
pushAttribute(target, "name", name);
|
||||
}
|
||||
|
||||
if (formAction !== null) {
|
||||
if (formAction != null) {
|
||||
pushAttribute(target, "formAction", formAction);
|
||||
}
|
||||
|
||||
if (formEncType !== null) {
|
||||
if (formEncType != null) {
|
||||
pushAttribute(target, "formEncType", formEncType);
|
||||
}
|
||||
|
||||
if (formMethod !== null) {
|
||||
if (formMethod != null) {
|
||||
pushAttribute(target, "formMethod", formMethod);
|
||||
}
|
||||
|
||||
if (formTarget !== null) {
|
||||
if (formTarget != null) {
|
||||
pushAttribute(target, "formTarget", formTarget);
|
||||
}
|
||||
|
||||
@@ -3567,19 +3567,19 @@ function pushStartForm(target, props, responseState) {
|
||||
}
|
||||
}
|
||||
|
||||
if (formAction !== null) {
|
||||
if (formAction != null) {
|
||||
pushAttribute(target, "action", formAction);
|
||||
}
|
||||
|
||||
if (formEncType !== null) {
|
||||
if (formEncType != null) {
|
||||
pushAttribute(target, "encType", formEncType);
|
||||
}
|
||||
|
||||
if (formMethod !== null) {
|
||||
if (formMethod != null) {
|
||||
pushAttribute(target, "method", formMethod);
|
||||
}
|
||||
|
||||
if (formTarget !== null) {
|
||||
if (formTarget != null) {
|
||||
pushAttribute(target, "target", formTarget);
|
||||
}
|
||||
|
||||
|
||||
@@ -313,11 +313,11 @@ function pushFormActionAttribute(
|
||||
formTarget,
|
||||
name
|
||||
) {
|
||||
null !== name && pushAttribute(target, "name", name);
|
||||
null !== formAction && pushAttribute(target, "formAction", formAction);
|
||||
null !== formEncType && pushAttribute(target, "formEncType", formEncType);
|
||||
null !== formMethod && pushAttribute(target, "formMethod", formMethod);
|
||||
null !== formTarget && pushAttribute(target, "formTarget", formTarget);
|
||||
null != name && pushAttribute(target, "name", name);
|
||||
null != formAction && pushAttribute(target, "formAction", formAction);
|
||||
null != formEncType && pushAttribute(target, "formEncType", formEncType);
|
||||
null != formMethod && pushAttribute(target, "formMethod", formMethod);
|
||||
null != formTarget && pushAttribute(target, "formTarget", formTarget);
|
||||
return null;
|
||||
}
|
||||
function pushAttribute(target, name, value) {
|
||||
@@ -1032,10 +1032,10 @@ function pushStartInstance(
|
||||
default:
|
||||
pushAttribute(target, name, propKey$jscomp$0);
|
||||
}
|
||||
null !== propValue && pushAttribute(target, "action", propValue);
|
||||
null !== resources && pushAttribute(target, "encType", resources);
|
||||
null !== selected && pushAttribute(target, "method", selected);
|
||||
null !== propValue$jscomp$0 &&
|
||||
null != propValue && pushAttribute(target, "action", propValue);
|
||||
null != resources && pushAttribute(target, "encType", resources);
|
||||
null != selected && pushAttribute(target, "method", selected);
|
||||
null != propValue$jscomp$0 &&
|
||||
pushAttribute(target, "target", propValue$jscomp$0);
|
||||
target.push(">");
|
||||
pushInnerHTML(target, textEmbedded, responseState);
|
||||
|
||||
Reference in New Issue
Block a user