Skip to content

Commit

Permalink
Do not show message if no files were compressed
Browse files Browse the repository at this point in the history
  • Loading branch information
bomberstudios committed Nov 5, 2021
1 parent f32d396 commit 2b3ce53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugin.js
Expand Up @@ -67,5 +67,7 @@ export function compress(context) {
fs.writeFileSync(currentFile, result.data, 'utf8')
}
})
UI.message(`SVGO Compressor: ${filesToCompress} file${filesToCompress == 1 ? '' : 's'} compressed`)
if (filesToCompress > 0) {
UI.message(`SVGO Compressor: ${filesToCompress} file${filesToCompress == 1 ? '' : 's'} compressed`)
}
}

0 comments on commit 2b3ce53

Please sign in to comment.