Skip to content

Commit

Permalink
fix(@ngtools/webpack): change min version requirement check in missin…
Browse files Browse the repository at this point in the history
…gTranslation 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.
  • Loading branch information
mhoyer-cid authored and mhoyer committed Jan 10, 2018
1 parent b6b8acc commit edae424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@ngtools/webpack/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`));
Expand Down

0 comments on commit edae424

Please sign in to comment.