Commit 66dbb5c9 authored by Philipp Nowinski's avatar Philipp Nowinski

[BUGFIX] resolve _optimize task early if no images have been found

parent 0d098c77
......@@ -100,6 +100,10 @@ module.exports = class Images extends Task {
async _optimize(_files, _imagesPath) {
return new Promise(async (_resolve) => {
if (_files.length === 0) {
this._logger.success(`No images found in ${_imagesPath}. Moving on.`);
if (!this._embedded) {
this._loadingSpinner = ora();
this._loadingSpinner.start(`Optimizing images...`);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment