Skip to content

Commit a82d043

Browse files
committed
lint
1 parent dab5979 commit a82d043

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/dom/performance/avoidScalingImages.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
for (let i = 0, len = images.length; i < len; i++) {
1313
const img = images[i];
14-
const fileExtension = (new URL(img.currentSrc)).pathname.split('.').pop();
14+
const fileExtension = new URL(img.currentSrc).pathname.split('.').pop();
1515

1616
// skip svg images and images that are 0 (carousel etc)
17-
if (fileExtension !== 'svg' && img.clientWidth + minLimit < img.naturalWidth && img.clientWidth > 0) {
17+
if (
18+
fileExtension !== 'svg' &&
19+
img.clientWidth + minLimit < img.naturalWidth &&
20+
img.clientWidth > 0
21+
) {
1822
// message = message + ' ' + util.getAbsoluteURL(img.currentSrc) + ' [browserWidth:' + img.clientWidth + ' naturalWidth: ' + img.naturalWidth +']';
1923
offending.push(util.getAbsoluteURL(img.currentSrc));
2024
score += 10;

0 commit comments

Comments
 (0)