Fix issue where name is undefined for some reason

pull/8535/head
Nguyen Tran 3 years ago
parent 3972cecf5e
commit d2105a3de9

@ -23,7 +23,7 @@ export function get_attribute_value(attribute: Attribute): ESTreeExpression {
* For value attribute of textarea, it will render as child node of `<textarea>` element. * For value attribute of textarea, it will render as child node of `<textarea>` element.
* Therefore, we need to escape as content (not attribute). * Therefore, we need to escape as content (not attribute).
*/ */
const is_textarea_value = attribute.parent.name.toLowerCase() === 'textarea' && attribute.name.toLowerCase() === 'value'; const is_textarea_value = attribute.parent.name?.toLowerCase() === 'textarea' && attribute.name?.toLowerCase() === 'value';
return attribute.chunks return attribute.chunks
.map((chunk) => { .map((chunk) => {

Loading…
Cancel
Save