1
1
mirror of https://github.com/primer/css.git synced 2024-12-02 07:53:06 +03:00

Default to variable name when parsing vars

This commit is contained in:
Michelle Tilley 2020-11-16 17:01:10 -08:00
parent a3fb1f7787
commit 9a3675457e
No known key found for this signature in database
GPG Key ID: 810E3A96D4CF00F4

View File

@ -73,7 +73,7 @@ function parseSCSSVariables(scssString, variables = {}) {
if (match) {
// eslint-disable-next-line no-unused-vars
const [_, name, value] = match
variables[name] = value.startsWith('$') ? variables[value.substr(1)] : value
variables[name] = value.startsWith('$') ? variables[value.substr(1)] || value : value
}
} while (match)
return variables