Quote `class` property name in attributes.

Fixes #830
pull/831/head
Jacob Mischka 7 years ago
parent 119e7078c9
commit b367cdac40
No known key found for this signature in database
GPG Key ID: 50A869F8CD9CBB9C

@ -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