File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ function encodeSvg(content) {
27
27
) ;
28
28
}
29
29
30
-
31
30
async function assertSize ( resource , maxFileSize , throwError = true ) {
32
31
const { mime, contents = '' } = resource || { } ;
33
32
const encoding = mime === 'image/svg+xml' ? 'utf-8' : 'binary' ;
@@ -76,12 +75,15 @@ async function getDataUriMapping(urls = [], options = {}) {
76
75
const file = await resolve ( url , options ) ;
77
76
if ( file && file . mime && / i m a g e / . test ( file . mime ) ) {
78
77
return [ url , await getDataUri ( file , options ) ] ;
79
- } else if ( options . largeFileCallback ) {
78
+ }
79
+
80
+ if ( options . largeFileCallback ) {
80
81
const largeFile = await resolve ( url , { ...options , maxFileSize : 0 } ) ;
81
82
if ( largeFile && largeFile . mime && / i m a g e / . test ( largeFile . mime ) ) {
82
83
return [ url , await options . largeFileCallback ( largeFile ) ] ;
83
84
}
84
85
}
86
+
85
87
return [ url , null ] ;
86
88
} ) ;
87
89
const results = await Promise . all ( promises ) ;
You can’t perform that action at this time.
0 commit comments