From edae424d55a10e329b87104dcb9a1c4ae5e99c12 Mon Sep 17 00:00:00 2001 From: Marcel Hoyer Date: Wed, 10 Jan 2018 23:02:52 +0100 Subject: [PATCH] fix(@ngtools/webpack): change min version requirement check in missingTranslation option validation When using `missingTranslation` in options for AotPlugin constructor the plugin will print a warning when angular (and cli) is already at version 5 or higher. --- packages/@ngtools/webpack/src/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@ngtools/webpack/src/plugin.ts b/packages/@ngtools/webpack/src/plugin.ts index 8c256a366794..e02650b173e4 100644 --- a/packages/@ngtools/webpack/src/plugin.ts +++ b/packages/@ngtools/webpack/src/plugin.ts @@ -295,7 +295,7 @@ export class AotPlugin implements Tapable { } if (options.hasOwnProperty('missingTranslation')) { const [MAJOR, MINOR, PATCH] = VERSION.full.split('.').map((x: string) => parseInt(x, 10)); - if (MAJOR < 4 || (MINOR == 2 && PATCH < 2)) { + if (MAJOR < 4 || (MAJOR == 4 && (MINOR < 2 || (MINOR == 2 && PATCH < 2)))) { console.warn((`The --missing-translation parameter will be ignored because it is only ` + `compatible with Angular version 4.2.0 or higher. If you want to use it, please ` + `upgrade your Angular version.\n`));