fix: wrong value comparition on tag case

pull/4349/head
Marcelo Jr 6 years ago
parent 89cfaeb859
commit 5860d858c4

@ -1357,7 +1357,7 @@ function process_component_options(component: Component, nodes) {
if (typeof value !== 'string' && value !== null) if (typeof value !== 'string' && value !== null)
component.error(attribute, { code, message }); component.error(attribute, { code, message });
if (value === 'tag') { if (name === 'tag') {
if (value && !/^[a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9-]+$/.test(value)) { if (value && !/^[a-zA-Z][a-zA-Z0-9]*-[a-zA-Z0-9-]+$/.test(value)) {
component.error(attribute, { component.error(attribute, {
code: `invalid-tag-property`, code: `invalid-tag-property`,

Loading…
Cancel
Save