GeezerVison is showing github.com — [Fizz] Fallback to client replaying actions if we're trying to serial… · react/react@86893d4
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -5d29478716cefbf8290dfdd19129156c2ac75973 | | 1 | +6bac4f2f31378cd58dffe6181e00639366a6081a |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/ReactDOMServer-dev.classic.js +24-7Lines changed: 24 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,7 +19,7 @@ if (__DEV__) { | 19 | 19 | var React = require('react'); | 20 | 20 | var ReactDOM = require('react-dom'); | 21 | 21 |
| 22 | | -var ReactVersion = '19.0.0-www-classic-f3d84129'; | | 22 | +var ReactVersion = '19.0.0-www-classic-b547cfd9'; | 23 | 23 |
| 24 | 24 | // This refers to a WWW module. | 25 | 25 | var warningWWW = require('warning'); | @@ -2572,11 +2572,7 @@ var startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"'); | 2572 | 2572 | function pushAdditionalFormField(value, key) { | 2573 | 2573 | var target = this; | 2574 | 2574 | target.push(startHiddenInputChunk); | 2575 | | - | 2576 | | - if (typeof value !== 'string') { | 2577 | | - throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'It probably means you are closing over binary data or FormData in a Server Action.'); | 2578 | | - } | 2579 | | - | | 2575 | + validateAdditionalFormField(value); | 2580 | 2576 | pushStringAttribute(target, 'name', key); | 2581 | 2577 | pushStringAttribute(target, 'value', value); | 2582 | 2578 | target.push(endOfStartTagSelfClosing); | @@ -2589,14 +2585,35 @@ function pushAdditionalFormFields(target, formData) { | 2589 | 2585 | } | 2590 | 2586 | } | 2591 | 2587 |
| | 2588 | +function validateAdditionalFormField(value, key) { | | 2589 | + if (typeof value !== 'string') { | | 2590 | + throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'Will fallback to client hydration.'); | | 2591 | + } | | 2592 | +} | | 2593 | + | | 2594 | +function validateAdditionalFormFields(formData) { | | 2595 | + if (formData != null) { | | 2596 | + // $FlowFixMe[prop-missing]: FormData has forEach. | | 2597 | + formData.forEach(validateAdditionalFormField); | | 2598 | + } | | 2599 | + | | 2600 | + return formData; | | 2601 | +} | | 2602 | + | 2592 | 2603 | function getCustomFormFields(resumableState, formAction) { | 2593 | 2604 | var customAction = formAction.$$FORM_ACTION; | 2594 | 2605 |
| 2595 | 2606 | if (typeof customAction === 'function') { | 2596 | 2607 | var prefix = makeFormFieldPrefix(resumableState); | 2597 | 2608 |
| 2598 | 2609 | try { | 2599 | | - return formAction.$$FORM_ACTION(prefix); | | 2610 | + var customFields = formAction.$$FORM_ACTION(prefix); | | 2611 | + | | 2612 | + if (customFields) { | | 2613 | + validateAdditionalFormFields(customFields.data); | | 2614 | + } | | 2615 | + | | 2616 | + return customFields; | 2600 | 2617 | } catch (x) { | 2601 | 2618 | if (typeof x === 'object' && x !== null && typeof x.then === 'function') { | 2602 | 2619 | // Rethrow suspense. | |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/ReactDOMServer-dev.modern.js +24-7Lines changed: 24 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,7 +19,7 @@ if (__DEV__) { | 19 | 19 | var React = require('react'); | 20 | 20 | var ReactDOM = require('react-dom'); | 21 | 21 |
| 22 | | -var ReactVersion = '19.0.0-www-modern-f9bdfca0'; | | 22 | +var ReactVersion = '19.0.0-www-modern-ce28692a'; | 23 | 23 |
| 24 | 24 | // This refers to a WWW module. | 25 | 25 | var warningWWW = require('warning'); | @@ -2572,11 +2572,7 @@ var startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"'); | 2572 | 2572 | function pushAdditionalFormField(value, key) { | 2573 | 2573 | var target = this; | 2574 | 2574 | target.push(startHiddenInputChunk); | 2575 | | - | 2576 | | - if (typeof value !== 'string') { | 2577 | | - throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'It probably means you are closing over binary data or FormData in a Server Action.'); | 2578 | | - } | 2579 | | - | | 2575 | + validateAdditionalFormField(value); | 2580 | 2576 | pushStringAttribute(target, 'name', key); | 2581 | 2577 | pushStringAttribute(target, 'value', value); | 2582 | 2578 | target.push(endOfStartTagSelfClosing); | @@ -2589,14 +2585,35 @@ function pushAdditionalFormFields(target, formData) { | 2589 | 2585 | } | 2590 | 2586 | } | 2591 | 2587 |
| | 2588 | +function validateAdditionalFormField(value, key) { | | 2589 | + if (typeof value !== 'string') { | | 2590 | + throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'Will fallback to client hydration.'); | | 2591 | + } | | 2592 | +} | | 2593 | + | | 2594 | +function validateAdditionalFormFields(formData) { | | 2595 | + if (formData != null) { | | 2596 | + // $FlowFixMe[prop-missing]: FormData has forEach. | | 2597 | + formData.forEach(validateAdditionalFormField); | | 2598 | + } | | 2599 | + | | 2600 | + return formData; | | 2601 | +} | | 2602 | + | 2592 | 2603 | function getCustomFormFields(resumableState, formAction) { | 2593 | 2604 | var customAction = formAction.$$FORM_ACTION; | 2594 | 2605 |
| 2595 | 2606 | if (typeof customAction === 'function') { | 2596 | 2607 | var prefix = makeFormFieldPrefix(resumableState); | 2597 | 2608 |
| 2598 | 2609 | try { | 2599 | | - return formAction.$$FORM_ACTION(prefix); | | 2610 | + var customFields = formAction.$$FORM_ACTION(prefix); | | 2611 | + | | 2612 | + if (customFields) { | | 2613 | + validateAdditionalFormFields(customFields.data); | | 2614 | + } | | 2615 | + | | 2616 | + return customFields; | 2600 | 2617 | } catch (x) { | 2601 | 2618 | if (typeof x === 'object' && x !== null && typeof x.then === 'function') { | 2602 | 2619 | // Rethrow suspense. | |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/ReactDOMServer-prod.classic.js +31-23Lines changed: 31 additions & 23 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -445,17 +445,25 @@ var actionJavaScriptURL = escapeTextForBrowser( | 445 | 445 | ); | 446 | 446 | function pushAdditionalFormField(value, key) { | 447 | 447 | this.push('<input type="hidden"'); | 448 | | - if ("string" !== typeof value) throw Error(formatProdErrorMessage(480)); | | 448 | + validateAdditionalFormField(value); | 449 | 449 | pushStringAttribute(this, "name", key); | 450 | 450 | pushStringAttribute(this, "value", value); | 451 | 451 | this.push("/>"); | 452 | 452 | } | | 453 | +function validateAdditionalFormField(value) { | | 454 | + if ("string" !== typeof value) throw Error(formatProdErrorMessage(480)); | | 455 | +} | 453 | 456 | function getCustomFormFields(resumableState, formAction) { | 454 | 457 | if ("function" === typeof formAction.$$FORM_ACTION) { | 455 | 458 | var id = resumableState.nextFormID++; | 456 | 459 | resumableState = resumableState.idPrefix + id; | 457 | 460 | try { | 458 | | - return formAction.$$FORM_ACTION(resumableState); | | 461 | + var customFields = formAction.$$FORM_ACTION(resumableState); | | 462 | + if (customFields) { | | 463 | + var formData = customFields.data; | | 464 | + null != formData && formData.forEach(validateAdditionalFormField); | | 465 | + } | | 466 | + return customFields; | 459 | 467 | } catch (x) { | 460 | 468 | if ("object" === typeof x && null !== x && "function" === typeof x.then) | 461 | 469 | throw x; | @@ -2627,16 +2635,16 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2627 | 2635 | "\x3c/script>" | 2628 | 2636 | ); | 2629 | 2637 | bootstrapScriptContent = idPrefix + "P:"; | 2630 | | - var JSCompiler_object_inline_segmentPrefix_1631 = idPrefix + "S:"; | | 2638 | + var JSCompiler_object_inline_segmentPrefix_1633 = idPrefix + "S:"; | 2631 | 2639 | idPrefix += "B:"; | 2632 | | - var JSCompiler_object_inline_preconnects_1645 = new Set(), | 2633 | | - JSCompiler_object_inline_fontPreloads_1646 = new Set(), | 2634 | | - JSCompiler_object_inline_highImagePreloads_1647 = new Set(), | 2635 | | - JSCompiler_object_inline_styles_1648 = new Map(), | 2636 | | - JSCompiler_object_inline_bootstrapScripts_1649 = new Set(), | 2637 | | - JSCompiler_object_inline_scripts_1650 = new Set(), | 2638 | | - JSCompiler_object_inline_bulkPreloads_1651 = new Set(), | 2639 | | - JSCompiler_object_inline_preloads_1652 = { | | 2640 | + var JSCompiler_object_inline_preconnects_1647 = new Set(), | | 2641 | + JSCompiler_object_inline_fontPreloads_1648 = new Set(), | | 2642 | + JSCompiler_object_inline_highImagePreloads_1649 = new Set(), | | 2643 | + JSCompiler_object_inline_styles_1650 = new Map(), | | 2644 | + JSCompiler_object_inline_bootstrapScripts_1651 = new Set(), | | 2645 | + JSCompiler_object_inline_scripts_1652 = new Set(), | | 2646 | + JSCompiler_object_inline_bulkPreloads_1653 = new Set(), | | 2647 | + JSCompiler_object_inline_preloads_1654 = { | 2640 | 2648 | images: new Map(), | 2641 | 2649 | stylesheets: new Map(), | 2642 | 2650 | scripts: new Map(), | @@ -2673,7 +2681,7 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2673 | 2681 | scriptConfig.moduleScriptResources[href] = null; | 2674 | 2682 | scriptConfig = []; | 2675 | 2683 | pushLinkImpl(scriptConfig, props); | 2676 | | - JSCompiler_object_inline_bootstrapScripts_1649.add(scriptConfig); | | 2684 | + JSCompiler_object_inline_bootstrapScripts_1651.add(scriptConfig); | 2677 | 2685 | bootstrapChunks.push('<script src="', escapeTextForBrowser(src)); | 2678 | 2686 | "string" === typeof integrity && | 2679 | 2687 | bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity)); | @@ -2714,7 +2722,7 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2714 | 2722 | (props.moduleScriptResources[scriptConfig] = null), | 2715 | 2723 | (props = []), | 2716 | 2724 | pushLinkImpl(props, integrity), | 2717 | | - JSCompiler_object_inline_bootstrapScripts_1649.add(props), | | 2725 | + JSCompiler_object_inline_bootstrapScripts_1651.add(props), | 2718 | 2726 | bootstrapChunks.push( | 2719 | 2727 | '<script type="module" src="', | 2720 | 2728 | escapeTextForBrowser(i) | @@ -2729,7 +2737,7 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2729 | 2737 | bootstrapChunks.push('" async="">\x3c/script>'); | 2730 | 2738 | return { | 2731 | 2739 | placeholderPrefix: bootstrapScriptContent, | 2732 | | - segmentPrefix: JSCompiler_object_inline_segmentPrefix_1631, | | 2740 | + segmentPrefix: JSCompiler_object_inline_segmentPrefix_1633, | 2733 | 2741 | boundaryPrefix: idPrefix, | 2734 | 2742 | startInlineScript: "<script>", | 2735 | 2743 | htmlChunks: null, | @@ -2749,14 +2757,14 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2749 | 2757 | charsetChunks: [], | 2750 | 2758 | viewportChunks: [], | 2751 | 2759 | hoistableChunks: [], | 2752 | | - preconnects: JSCompiler_object_inline_preconnects_1645, | 2753 | | - fontPreloads: JSCompiler_object_inline_fontPreloads_1646, | 2754 | | - highImagePreloads: JSCompiler_object_inline_highImagePreloads_1647, | 2755 | | - styles: JSCompiler_object_inline_styles_1648, | 2756 | | - bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1649, | 2757 | | - scripts: JSCompiler_object_inline_scripts_1650, | 2758 | | - bulkPreloads: JSCompiler_object_inline_bulkPreloads_1651, | 2759 | | - preloads: JSCompiler_object_inline_preloads_1652, | | 2760 | + preconnects: JSCompiler_object_inline_preconnects_1647, | | 2761 | + fontPreloads: JSCompiler_object_inline_fontPreloads_1648, | | 2762 | + highImagePreloads: JSCompiler_object_inline_highImagePreloads_1649, | | 2763 | + styles: JSCompiler_object_inline_styles_1650, | | 2764 | + bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1651, | | 2765 | + scripts: JSCompiler_object_inline_scripts_1652, | | 2766 | + bulkPreloads: JSCompiler_object_inline_bulkPreloads_1653, | | 2767 | + preloads: JSCompiler_object_inline_preloads_1654, | 2760 | 2768 | stylesToHoist: !1, | 2761 | 2769 | generateStaticMarkup: generateStaticMarkup | 2762 | 2770 | }; | @@ -5691,4 +5699,4 @@ exports.renderToString = function (children, options) { | 5691 | 5699 | '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' | 5692 | 5700 | ); | 5693 | 5701 | }; | 5694 | | -exports.version = "19.0.0-www-classic-a976e819"; | | 5702 | +exports.version = "19.0.0-www-classic-444074d7"; |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/ReactDOMServer-prod.modern.js +31-23Lines changed: 31 additions & 23 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -445,17 +445,25 @@ var actionJavaScriptURL = escapeTextForBrowser( | 445 | 445 | ); | 446 | 446 | function pushAdditionalFormField(value, key) { | 447 | 447 | this.push('<input type="hidden"'); | 448 | | - if ("string" !== typeof value) throw Error(formatProdErrorMessage(480)); | | 448 | + validateAdditionalFormField(value); | 449 | 449 | pushStringAttribute(this, "name", key); | 450 | 450 | pushStringAttribute(this, "value", value); | 451 | 451 | this.push("/>"); | 452 | 452 | } | | 453 | +function validateAdditionalFormField(value) { | | 454 | + if ("string" !== typeof value) throw Error(formatProdErrorMessage(480)); | | 455 | +} | 453 | 456 | function getCustomFormFields(resumableState, formAction) { | 454 | 457 | if ("function" === typeof formAction.$$FORM_ACTION) { | 455 | 458 | var id = resumableState.nextFormID++; | 456 | 459 | resumableState = resumableState.idPrefix + id; | 457 | 460 | try { | 458 | | - return formAction.$$FORM_ACTION(resumableState); | | 461 | + var customFields = formAction.$$FORM_ACTION(resumableState); | | 462 | + if (customFields) { | | 463 | + var formData = customFields.data; | | 464 | + null != formData && formData.forEach(validateAdditionalFormField); | | 465 | + } | | 466 | + return customFields; | 459 | 467 | } catch (x) { | 460 | 468 | if ("object" === typeof x && null !== x && "function" === typeof x.then) | 461 | 469 | throw x; | @@ -2627,16 +2635,16 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2627 | 2635 | "\x3c/script>" | 2628 | 2636 | ); | 2629 | 2637 | bootstrapScriptContent = idPrefix + "P:"; | 2630 | | - var JSCompiler_object_inline_segmentPrefix_1618 = idPrefix + "S:"; | | 2638 | + var JSCompiler_object_inline_segmentPrefix_1620 = idPrefix + "S:"; | 2631 | 2639 | idPrefix += "B:"; | 2632 | | - var JSCompiler_object_inline_preconnects_1632 = new Set(), | 2633 | | - JSCompiler_object_inline_fontPreloads_1633 = new Set(), | 2634 | | - JSCompiler_object_inline_highImagePreloads_1634 = new Set(), | 2635 | | - JSCompiler_object_inline_styles_1635 = new Map(), | 2636 | | - JSCompiler_object_inline_bootstrapScripts_1636 = new Set(), | 2637 | | - JSCompiler_object_inline_scripts_1637 = new Set(), | 2638 | | - JSCompiler_object_inline_bulkPreloads_1638 = new Set(), | 2639 | | - JSCompiler_object_inline_preloads_1639 = { | | 2640 | + var JSCompiler_object_inline_preconnects_1634 = new Set(), | | 2641 | + JSCompiler_object_inline_fontPreloads_1635 = new Set(), | | 2642 | + JSCompiler_object_inline_highImagePreloads_1636 = new Set(), | | 2643 | + JSCompiler_object_inline_styles_1637 = new Map(), | | 2644 | + JSCompiler_object_inline_bootstrapScripts_1638 = new Set(), | | 2645 | + JSCompiler_object_inline_scripts_1639 = new Set(), | | 2646 | + JSCompiler_object_inline_bulkPreloads_1640 = new Set(), | | 2647 | + JSCompiler_object_inline_preloads_1641 = { | 2640 | 2648 | images: new Map(), | 2641 | 2649 | stylesheets: new Map(), | 2642 | 2650 | scripts: new Map(), | @@ -2673,7 +2681,7 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2673 | 2681 | scriptConfig.moduleScriptResources[href] = null; | 2674 | 2682 | scriptConfig = []; | 2675 | 2683 | pushLinkImpl(scriptConfig, props); | 2676 | | - JSCompiler_object_inline_bootstrapScripts_1636.add(scriptConfig); | | 2684 | + JSCompiler_object_inline_bootstrapScripts_1638.add(scriptConfig); | 2677 | 2685 | bootstrapChunks.push('<script src="', escapeTextForBrowser(src)); | 2678 | 2686 | "string" === typeof integrity && | 2679 | 2687 | bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity)); | @@ -2714,7 +2722,7 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2714 | 2722 | (props.moduleScriptResources[scriptConfig] = null), | 2715 | 2723 | (props = []), | 2716 | 2724 | pushLinkImpl(props, integrity), | 2717 | | - JSCompiler_object_inline_bootstrapScripts_1636.add(props), | | 2725 | + JSCompiler_object_inline_bootstrapScripts_1638.add(props), | 2718 | 2726 | bootstrapChunks.push( | 2719 | 2727 | '<script type="module" src="', | 2720 | 2728 | escapeTextForBrowser(i) | @@ -2729,7 +2737,7 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2729 | 2737 | bootstrapChunks.push('" async="">\x3c/script>'); | 2730 | 2738 | return { | 2731 | 2739 | placeholderPrefix: bootstrapScriptContent, | 2732 | | - segmentPrefix: JSCompiler_object_inline_segmentPrefix_1618, | | 2740 | + segmentPrefix: JSCompiler_object_inline_segmentPrefix_1620, | 2733 | 2741 | boundaryPrefix: idPrefix, | 2734 | 2742 | startInlineScript: "<script>", | 2735 | 2743 | htmlChunks: null, | @@ -2749,14 +2757,14 @@ function createRenderState(resumableState, generateStaticMarkup) { | 2749 | 2757 | charsetChunks: [], | 2750 | 2758 | viewportChunks: [], | 2751 | 2759 | hoistableChunks: [], | 2752 | | - preconnects: JSCompiler_object_inline_preconnects_1632, | 2753 | | - fontPreloads: JSCompiler_object_inline_fontPreloads_1633, | 2754 | | - highImagePreloads: JSCompiler_object_inline_highImagePreloads_1634, | 2755 | | - styles: JSCompiler_object_inline_styles_1635, | 2756 | | - bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1636, | 2757 | | - scripts: JSCompiler_object_inline_scripts_1637, | 2758 | | - bulkPreloads: JSCompiler_object_inline_bulkPreloads_1638, | 2759 | | - preloads: JSCompiler_object_inline_preloads_1639, | | 2760 | + preconnects: JSCompiler_object_inline_preconnects_1634, | | 2761 | + fontPreloads: JSCompiler_object_inline_fontPreloads_1635, | | 2762 | + highImagePreloads: JSCompiler_object_inline_highImagePreloads_1636, | | 2763 | + styles: JSCompiler_object_inline_styles_1637, | | 2764 | + bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1638, | | 2765 | + scripts: JSCompiler_object_inline_scripts_1639, | | 2766 | + bulkPreloads: JSCompiler_object_inline_bulkPreloads_1640, | | 2767 | + preloads: JSCompiler_object_inline_preloads_1641, | 2760 | 2768 | stylesToHoist: !1, | 2761 | 2769 | generateStaticMarkup: generateStaticMarkup | 2762 | 2770 | }; | @@ -5669,4 +5677,4 @@ exports.renderToString = function (children, options) { | 5669 | 5677 | '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' | 5670 | 5678 | ); | 5671 | 5679 | }; | 5672 | | -exports.version = "19.0.0-www-modern-54e820e3"; | | 5680 | +exports.version = "19.0.0-www-modern-df91acfc"; |
Collapse file Copy file name to clipboardExpand all lines: compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +23-6Lines changed: 23 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -2569,11 +2569,7 @@ var startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"'); | 2569 | 2569 | function pushAdditionalFormField(value, key) { | 2570 | 2570 | var target = this; | 2571 | 2571 | target.push(startHiddenInputChunk); | 2572 | | - | 2573 | | - if (typeof value !== 'string') { | 2574 | | - throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'It probably means you are closing over binary data or FormData in a Server Action.'); | 2575 | | - } | 2576 | | - | | 2572 | + validateAdditionalFormField(value); | 2577 | 2573 | pushStringAttribute(target, 'name', key); | 2578 | 2574 | pushStringAttribute(target, 'value', value); | 2579 | 2575 | target.push(endOfStartTagSelfClosing); | @@ -2586,14 +2582,35 @@ function pushAdditionalFormFields(target, formData) { | 2586 | 2582 | } | 2587 | 2583 | } | 2588 | 2584 |
| | 2585 | +function validateAdditionalFormField(value, key) { | | 2586 | + if (typeof value !== 'string') { | | 2587 | + throw new Error('File/Blob fields are not yet supported in progressive forms. ' + 'Will fallback to client hydration.'); | | 2588 | + } | | 2589 | +} | | 2590 | + | | 2591 | +function validateAdditionalFormFields(formData) { | | 2592 | + if (formData != null) { | | 2593 | + // $FlowFixMe[prop-missing]: FormData has forEach. | | 2594 | + formData.forEach(validateAdditionalFormField); | | 2595 | + } | | 2596 | + | | 2597 | + return formData; | | 2598 | +} | | 2599 | + | 2589 | 2600 | function getCustomFormFields(resumableState, formAction) { | 2590 | 2601 | var customAction = formAction.$$FORM_ACTION; | 2591 | 2602 |
| 2592 | 2603 | if (typeof customAction === 'function') { | 2593 | 2604 | var prefix = makeFormFieldPrefix(resumableState); | 2594 | 2605 |
| 2595 | 2606 | try { | 2596 | | - return formAction.$$FORM_ACTION(prefix); | | 2607 | + var customFields = formAction.$$FORM_ACTION(prefix); | | 2608 | + | | 2609 | + if (customFields) { | | 2610 | + validateAdditionalFormFields(customFields.data); | | 2611 | + } | | 2612 | + | | 2613 | + return customFields; | 2597 | 2614 | } catch (x) { | 2598 | 2615 | if (typeof x === 'object' && x !== null && typeof x.then === 'function') { | 2599 | 2616 | // Rethrow suspense. | |
|