Skip to content

Commit f9f5d01

Browse files
authored
Make sure call with no images resolves properly (#24)
1 parent cc80898 commit f9f5d01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ export const generateImageSizes = (options) => {
188188
// Finds all the images we want based on dir and inputFormat
189189
globby(`${dirGlob}/**/*.{${inputFormats.join(',')}}`)
190190
.then((images) => {
191+
// If no images were provided, resolve the queue.
192+
if (images.length === 0) q.add(() => Promise.resolve());
193+
191194
// Map them into jimp objects
192195
images
193196
.filter((d) => d.indexOf('@') < 0 && d.indexOf('#') < 0)

0 commit comments

Comments
 (0)