File tree 2 files changed +11
-2
lines changed
packages/react-dom/src/server
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,12 @@ export function createMarkupForCustomAttribute(
71
71
name : string ,
72
72
value : mixed ,
73
73
) : string {
74
- if ( ! isAttributeNameSafe ( name ) || value == null ) {
74
+ if (
75
+ ! isAttributeNameSafe ( name ) ||
76
+ value == null ||
77
+ typeof value === 'function' ||
78
+ typeof value === 'symbol'
79
+ ) {
75
80
return '' ;
76
81
}
77
82
return name + '=' + quoteAttributeValueForBrowser ( value ) ;
Original file line number Diff line number Diff line change @@ -1070,7 +1070,11 @@ function pushStartCustomElement(
1070
1070
// Ignored. These are built-in to React on the client.
1071
1071
break ;
1072
1072
default :
1073
- if ( isAttributeNameSafe ( propKey ) ) {
1073
+ if (
1074
+ isAttributeNameSafe ( propKey ) &&
1075
+ typeof propValue !== 'function' &&
1076
+ typeof propValue !== 'symbol'
1077
+ ) {
1074
1078
target . push (
1075
1079
attributeSeparator ,
1076
1080
stringToChunk ( propKey ) ,
You can’t perform that action at this time.
0 commit comments