fix: remove superfluous spaces when normalizing class (#3083)

Co-authored-by: Jacek Karczmarczyk <jkarczm@gmail.com>
This commit is contained in:
Albert Kaaman
2021-02-04 14:41:46 +01:00
committed by GitHub
parent 49bc2e4db5
commit 4b551420fc
2 changed files with 21 additions and 1 deletions

View File

@@ -62,7 +62,10 @@ export function normalizeClass(value: unknown): string {
res = value
} else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
res += normalizeClass(value[i]) + ' '
const normalized = normalizeClass(value[i])
if (normalized) {
res += normalized + ' '
}
}
} else if (isObject(value)) {
for (const name in value) {