You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
+5-11Lines changed: 5 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,6 @@ import {
28
28
import{Children}from'react';
29
29
30
30
import{
31
-
enableBigIntSupport,
32
31
enableFilterEmptyStringAttributesDOM,
33
32
enableFizzExternalRuntime,
34
33
}from'shared/ReactFeatureFlags';
@@ -1664,8 +1663,7 @@ function flattenOptionChildren(children: mixed): string {
1664
1663
!didWarnInvalidOptionChildren&&
1665
1664
typeofchild!=='string'&&
1666
1665
typeofchild!=='number'&&
1667
-
((enableBigIntSupport&&typeofchild!=='bigint')||
1668
-
!enableBigIntSupport)
1666
+
typeofchild!=='bigint'
1669
1667
){
1670
1668
didWarnInvalidOptionChildren=true;
1671
1669
console.error(
@@ -2983,40 +2981,36 @@ function pushTitle(
2983
2981
2984
2982
if(Array.isArray(children)&&children.length>1){
2985
2983
console.error(
2986
-
'React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an Array with length %s instead.'+
2984
+
'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead.'+
2987
2985
' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value'+
2988
2986
' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.'+
2989
2987
' For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop'+
2990
2988
' is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.',
typeofchild==='function' ? 'a Function' : 'a Sybmol';
2997
2994
console.error(
2998
-
'React expect children of <title> tags to be a string, number%s, or object with a novel `toString` method but found %s instead.'+
2995
+
'React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead.'+
2999
2996
' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>'+
3000
2997
' tags to a single string value.',
3001
-
enableBigIntSupport ? ', bigint' : '',
3002
2998
childType,
3003
2999
);
3004
3000
}elseif(child&&child.toString==={}.toString){
3005
3001
if(child.$$typeof!=null){
3006
3002
console.error(
3007
-
'React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that appears to be'+
3003
+
'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be'+
3008
3004
' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to'+
3009
3005
' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is'+
3010
3006
' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.',
3011
-
enableBigIntSupport ? ', bigint' : '',
3012
3007
);
3013
3008
}else{
3014
3009
console.error(
3015
-
'React expects the `children` prop of <title> tags to be a string, number%s, or object with a novel `toString` method but found an object that does not implement'+
3010
+
'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement'+
3016
3011
' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags'+
3017
3012
' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>'+
3018
3013
' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.',
', or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.',
5734
+
'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.',
', or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.',
5771
+
'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.',
', or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.',
5806
+
'React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.',
0 commit comments