File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ function domToReact(nodes, options) {
62
62
}
63
63
64
64
props = node . attribs ;
65
- if ( ! shouldPassAttributesUnaltered ( node ) ) {
65
+ if ( ! skipAttributesToProps ( node ) ) {
66
66
props = attributesToProps ( node . attribs ) ;
67
67
}
68
68
@@ -109,12 +109,13 @@ function domToReact(nodes, options) {
109
109
}
110
110
111
111
/**
112
- * Determines whether attributes should be altered or not.
112
+ * Determines whether DOM element attributes should be transformed to props.
113
+ * Web Components (custom elements) should not have their attributes transformed.
113
114
*
114
- * @param { React.ReactElement } node
115
- * @return {Boolean }
115
+ * @param { DomElement } node
116
+ * @return {boolean }
116
117
*/
117
- function shouldPassAttributesUnaltered ( node ) {
118
+ function skipAttributesToProps ( node ) {
118
119
return (
119
120
utilities . PRESERVE_CUSTOM_ATTRIBUTES &&
120
121
node . type === 'tag' &&
You can’t perform that action at this time.
0 commit comments