We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a7d769 commit 87a647fCopy full SHA for 87a647f
packages/vite/src/node/utils.ts
@@ -767,7 +767,9 @@ interface ImageCandidate {
767
const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g
768
const imageSetUrlRE = /^(?:[\w\-]+\(.*?\)|'.*?'|".*?"|\S*)/
769
function joinSrcset(ret: ImageCandidate[]) {
770
- return ret.map(({ url, descriptor }) => `${url} ${descriptor}`).join(', ')
+ return ret
771
+ .map(({ url, descriptor }) => url + (descriptor ? ` ${descriptor}` : ''))
772
+ .join(', ')
773
}
774
775
function splitSrcSetDescriptor(srcs: string): ImageCandidate[] {
0 commit comments