File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export default (options = {}) => {
5656 // Map them into jimp objects
5757 images
5858 . filter ( ( d ) => d . indexOf ( '@' ) < 0 && d . indexOf ( '#' ) < 0 )
59- . forEach ( ( image ) => {
59+ . forEach ( ( image , index , imageArray ) => {
6060 // generate the output path
6161 const imagePathSplit = image . split ( '.' ) ;
6262 const imagePathPre = imagePathSplit . slice ( 0 , - 1 ) . join ( '.' ) ;
@@ -88,7 +88,12 @@ export default (options = {}) => {
8888 ) ;
8989
9090 // if images already exist, we can skip this rest of this process
91- if ( outputs . length === 0 ) return ;
91+ if ( outputs . length === 0 ) {
92+ // If every single file is skipped, we still need to resolve
93+ // so that promise-queue doesn't sit around waiting forever.
94+ if ( index === imageArray . length - 1 ) q . add ( ( ) => Promise . resolve ( ) ) ;
95+ return ;
96+ }
9297 }
9398
9499 // ////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments