@@ -1527,13 +1527,13 @@ const startClientRenderedSuspenseBoundary = stringToPrecomputedChunk(
1527
1527
const endSuspenseBoundary = stringToPrecomputedChunk ( '<!--/$-->' ) ;
1528
1528
1529
1529
const clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk (
1530
- '<template data-hash ="' ,
1530
+ '<template data-dgst ="' ,
1531
1531
) ;
1532
1532
const clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk (
1533
1533
'" data-msg="' ,
1534
1534
) ;
1535
1535
const clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk (
1536
- '" data-stack ="' ,
1536
+ '" data-stck ="' ,
1537
1537
) ;
1538
1538
const clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk (
1539
1539
'"></template>' ,
@@ -1576,7 +1576,7 @@ export function writeStartPendingSuspenseBoundary(
1576
1576
export function writeStartClientRenderedSuspenseBoundary (
1577
1577
destination : Destination ,
1578
1578
responseState : ResponseState ,
1579
- errorHash : ?string ,
1579
+ errorDigest : ?string ,
1580
1580
errorMesssage : ?string ,
1581
1581
errorComponentStack : ?string ,
1582
1582
) : boolean {
@@ -1585,33 +1585,31 @@ export function writeStartClientRenderedSuspenseBoundary(
1585
1585
destination ,
1586
1586
startClientRenderedSuspenseBoundary ,
1587
1587
) ;
1588
- if ( errorHash ) {
1589
- writeChunk ( destination , clientRenderedSuspenseBoundaryError1 ) ;
1590
- writeChunk ( destination , stringToChunk ( escapeTextForBrowser ( errorHash ) ) ) ;
1591
- // In prod errorMessage will usually be nullish but there is one case where
1592
- // it is used (currently when the server aborts the task) so we leave it ungated.
1588
+ writeChunk ( destination , clientRenderedSuspenseBoundaryError1 ) ;
1589
+ writeChunk (
1590
+ destination ,
1591
+ stringToChunk ( escapeTextForBrowser ( errorDigest || '' ) ) ,
1592
+ ) ;
1593
+ if ( __DEV__ ) {
1593
1594
if ( errorMesssage ) {
1594
1595
writeChunk ( destination , clientRenderedSuspenseBoundaryError1A ) ;
1595
1596
writeChunk (
1596
1597
destination ,
1597
1598
stringToChunk ( escapeTextForBrowser ( errorMesssage ) ) ,
1598
1599
) ;
1599
1600
}
1600
- if ( __DEV__ ) {
1601
- // Component stacks are currently only captured in dev
1602
- if ( errorComponentStack ) {
1603
- writeChunk ( destination , clientRenderedSuspenseBoundaryError1B ) ;
1604
- writeChunk (
1605
- destination ,
1606
- stringToChunk ( escapeTextForBrowser ( errorComponentStack ) ) ,
1607
- ) ;
1608
- }
1601
+ if ( errorComponentStack ) {
1602
+ writeChunk ( destination , clientRenderedSuspenseBoundaryError1B ) ;
1603
+ writeChunk (
1604
+ destination ,
1605
+ stringToChunk ( escapeTextForBrowser ( errorComponentStack ) ) ,
1606
+ ) ;
1609
1607
}
1610
- result = writeChunkAndReturn (
1611
- destination ,
1612
- clientRenderedSuspenseBoundaryError2 ,
1613
- ) ;
1614
1608
}
1609
+ result = writeChunkAndReturn (
1610
+ destination ,
1611
+ clientRenderedSuspenseBoundaryError2 ,
1612
+ ) ;
1615
1613
return result ;
1616
1614
}
1617
1615
export function writeEndCompletedSuspenseBoundary (
@@ -1772,7 +1770,7 @@ export function writeEndSegment(
1772
1770
// const SUSPENSE_PENDING_START_DATA = '$?';
1773
1771
// const SUSPENSE_FALLBACK_START_DATA = '$!';
1774
1772
//
1775
- // function clientRenderBoundary(suspenseBoundaryID, errorHash , errorMsg, errorComponentStack) {
1773
+ // function clientRenderBoundary(suspenseBoundaryID, errorDigest , errorMsg, errorComponentStack) {
1776
1774
// // Find the fallback's first element.
1777
1775
// const suspenseIdNode = document.getElementById(suspenseBoundaryID);
1778
1776
// if (!suspenseIdNode) {
@@ -1786,9 +1784,9 @@ export function writeEndSegment(
1786
1784
// suspenseNode.data = SUSPENSE_FALLBACK_START_DATA;
1787
1785
// // assign error metadata to first sibling
1788
1786
// let dataset = suspenseIdNode.dataset;
1789
- // if (errorHash ) dataset.hash = errorHash ;
1787
+ // if (errorDigest ) dataset.dgst = errorDigest ;
1790
1788
// if (errorMsg) dataset.msg = errorMsg;
1791
- // if (errorComponentStack) dataset.stack = errorComponentStack;
1789
+ // if (errorComponentStack) dataset.stck = errorComponentStack;
1792
1790
// // Tell React to retry it if the parent already hydrated.
1793
1791
// if (suspenseNode._reactRetry) {
1794
1792
// suspenseNode._reactRetry();
@@ -1876,7 +1874,7 @@ const completeSegmentFunction =
1876
1874
const completeBoundaryFunction =
1877
1875
'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}' ;
1878
1876
const clientRenderFunction =
1879
- 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.hash =c),d&&(a.msg=d),e&&(a.stack =e),b._reactRetry&&b._reactRetry())}' ;
1877
+ 'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst =c),d&&(a.msg=d),e&&(a.stck =e),b._reactRetry&&b._reactRetry())}' ;
1880
1878
1881
1879
const completeSegmentScript1Full = stringToPrecomputedChunk (
1882
1880
completeSegmentFunction + ';$RS("' ,
@@ -1957,7 +1955,7 @@ export function writeClientRenderBoundaryInstruction(
1957
1955
destination : Destination ,
1958
1956
responseState : ResponseState ,
1959
1957
boundaryID : SuspenseBoundaryID ,
1960
- errorHash : ?string ,
1958
+ errorDigest : ?string ,
1961
1959
errorMessage ?: string ,
1962
1960
errorComponentStack ?: string ,
1963
1961
) : boolean {
@@ -1979,11 +1977,11 @@ export function writeClientRenderBoundaryInstruction(
1979
1977
1980
1978
writeChunk ( destination , boundaryID ) ;
1981
1979
writeChunk ( destination , clientRenderScript1A ) ;
1982
- if ( errorHash || errorMessage || errorComponentStack ) {
1980
+ if ( errorDigest || errorMessage || errorComponentStack ) {
1983
1981
writeChunk ( destination , clientRenderErrorScriptArgInterstitial ) ;
1984
1982
writeChunk (
1985
1983
destination ,
1986
- stringToChunk ( escapeJSStringsForInstructionScripts ( errorHash || '' ) ) ,
1984
+ stringToChunk ( escapeJSStringsForInstructionScripts ( errorDigest || '' ) ) ,
1987
1985
) ;
1988
1986
}
1989
1987
if ( errorMessage || errorComponentStack ) {
0 commit comments