Skip to content

Commit 3028586

Browse files
committed
lint
1 parent f0fd993 commit 3028586

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/image.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function encodeSvg(content) {
2727
);
2828
}
2929

30-
3130
async function assertSize(resource, maxFileSize, throwError = true) {
3231
const {mime, contents = ''} = resource || {};
3332
const encoding = mime === 'image/svg+xml' ? 'utf-8' : 'binary';
@@ -76,12 +75,15 @@ async function getDataUriMapping(urls = [], options = {}) {
7675
const file = await resolve(url, options);
7776
if (file && file.mime && /image/.test(file.mime)) {
7877
return [url, await getDataUri(file, options)];
79-
} else if (options.largeFileCallback) {
78+
}
79+
80+
if (options.largeFileCallback) {
8081
const largeFile = await resolve(url, {...options, maxFileSize: 0});
8182
if (largeFile && largeFile.mime && /image/.test(largeFile.mime)) {
8283
return [url, await options.largeFileCallback(largeFile)];
8384
}
8485
}
86+
8587
return [url, null];
8688
});
8789
const results = await Promise.all(promises);

0 commit comments

Comments
 (0)