fix(compiler-sfc): fix missing whitespace issue in srcsets (#3132)

fix #3069
This commit is contained in:
Jonas Kruckenberg
2021-03-30 00:28:22 +02:00
committed by GitHub
parent 0fe567abfc
commit 42b68c773d
2 changed files with 19 additions and 19 deletions

View File

@@ -131,9 +131,9 @@ export const transformSrcset: NodeTransform = (
}
const isNotLast = imageCandidates.length - 1 > index
if (descriptor && isNotLast) {
compoundExpression.children.push(` + '${descriptor}, ' + `)
compoundExpression.children.push(` + ' ${descriptor}, ' + `)
} else if (descriptor) {
compoundExpression.children.push(` + '${descriptor}'`)
compoundExpression.children.push(` + ' ${descriptor}'`)
} else if (isNotLast) {
compoundExpression.children.push(` + ', ' + `)
}