Skip to content

Commit fe0c6a1

Browse files
authored
Merge pull request #4 from sonngoc17899/master
fix(split-data-srcset): handle split data srcset case url has ','
2 parents dfd5801 + fc664c8 commit fe0c6a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function getBestSelectionFromSrcset(el, scale) {
6464
let tmpSrc
6565
let tmpWidth
6666

67-
options = options.trim().split(',')
67+
options = options.trim().split(/(?<=\d+w),/)
6868

6969
const result = options.map(item => {
7070
item = item.trim()

0 commit comments

Comments
 (0)