Skip to content

Commit

Permalink
useFormState fix: action -> target (#27309)
Browse files Browse the repository at this point in the history
I mixed these attributes up in
#27302

DiffTrain build for [2fba484](2fba484)
  • Loading branch information
acdlite committed Aug 30, 2023
1 parent dd401dc commit 469fd47
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ddff504695f33c19e8c0792bff82bd8f8b8f7c05
2fba484cd095ea79b940364cea5107fa4ca9f0c8
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-classic-0ebcd846";
var ReactVersion = "18.3.0-www-classic-b66d17d9";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -9616,14 +9616,14 @@ function useFormState(action, initialState, permalink) {
// $FlowIgnore[prop-missing]
dispatch.$$FORM_ACTION = function (prefix) {
// $FlowIgnore[prop-missing]
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the target URL
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL

if (permalink !== undefined) {
{
checkAttributeStringCoercion(permalink, "target");
}

metadata.target = permalink + "";
metadata.action = permalink + "";
}

return metadata;
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-modern-528c5df7";
var ReactVersion = "18.3.0-www-modern-a9c5f511";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -9375,14 +9375,14 @@ function useFormState(action, initialState, permalink) {
// $FlowIgnore[prop-missing]
dispatch.$$FORM_ACTION = function (prefix) {
// $FlowIgnore[prop-missing]
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the target URL
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL

if (permalink !== undefined) {
{
checkAttributeStringCoercion(permalink, "target");
}

metadata.target = permalink + "";
metadata.action = permalink + "";
}

return metadata;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactDOMServer-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,7 @@ function useFormState(action, initialState, permalink) {
"function" === typeof boundAction.$$FORM_ACTION &&
(dispatch.$$FORM_ACTION = function (prefix) {
prefix = boundAction.$$FORM_ACTION(prefix);
void 0 !== permalink && (prefix.target = permalink + "");
void 0 !== permalink && (prefix.action = permalink + "");
return prefix;
});
return [initialState, dispatch];
Expand Down Expand Up @@ -4415,4 +4415,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-31e5c37c";
exports.version = "18.3.0-www-classic-d7739767";
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactDOMServer-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,7 @@ function useFormState(action, initialState, permalink) {
"function" === typeof boundAction.$$FORM_ACTION &&
(dispatch.$$FORM_ACTION = function (prefix) {
prefix = boundAction.$$FORM_ACTION(prefix);
void 0 !== permalink && (prefix.target = permalink + "");
void 0 !== permalink && (prefix.action = permalink + "");
return prefix;
});
return [initialState, dispatch];
Expand Down Expand Up @@ -4398,4 +4398,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-03f0f7fc";
exports.version = "18.3.0-www-modern-eac21e34";
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -9281,14 +9281,14 @@ function useFormState(action, initialState, permalink) {
// $FlowIgnore[prop-missing]
dispatch.$$FORM_ACTION = function (prefix) {
// $FlowIgnore[prop-missing]
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the target URL
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL

if (permalink !== undefined) {
{
checkAttributeStringCoercion(permalink, "target");
}

metadata.target = permalink + "";
metadata.action = permalink + "";
}

return metadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ function useFormState(action, initialState, permalink) {
"function" === typeof boundAction.$$FORM_ACTION &&
(dispatch.$$FORM_ACTION = function (prefix) {
prefix = boundAction.$$FORM_ACTION(prefix);
void 0 !== permalink && (prefix.target = permalink + "");
void 0 !== permalink && (prefix.action = permalink + "");
return prefix;
});
return [initialState, dispatch];
Expand Down

0 comments on commit 469fd47

Please sign in to comment.