Fix bug where obsolete strings were not removed when --clean was used. Closes #29

This commit is contained in:
Kim Biesbjerg 2017-03-31 08:31:14 +02:00
parent 5ad1fe6a18
commit bcb4a9c069
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@biesbjerg/ngx-translate-extract",
"version": "2.2.0",
"version": "2.2.1",
"description": "Extract strings from projects using ngx-translate",
"main": "dist/index.js",
"typings": "dist/index.d.ts",

View File

@ -104,7 +104,7 @@ export class ExtractTask implements TaskInterface {
if (this._options.clean) {
const collectionCount = processedCollection.count();
processedCollection = processedCollection.intersect(processedCollection);
processedCollection = processedCollection.intersect(collection);
const removeCount = collectionCount - processedCollection.count();
if (removeCount > 0) {
this._out(chalk.dim('- removed %d obsolete strings'), removeCount);