Quote `class` property name in attributes.

Fixes #830
pull/7738/head
Jacob Mischka 8 years ago
parent 3c50aeb4e8
commit b0ec78a99e

@ -257,6 +257,6 @@ function getClaimStatement(
}
function quoteProp(name: string) {
if (/[^a-zA-Z_$0-9]/.test(name)) return `"${name}"`;
if (/[^a-zA-Z_$0-9]/.test(name) || name === 'class') return `"${name}"`;
return name;
}

Loading…
Cancel
Save