Skip to content

Commit edae424

Browse files
mhoyer-cidmhoyer
authored andcommitted
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.
1 parent b6b8acc commit edae424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@ngtools/webpack/src/plugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export class AotPlugin implements Tapable {
295295
}
296296
if (options.hasOwnProperty('missingTranslation')) {
297297
const [MAJOR, MINOR, PATCH] = VERSION.full.split('.').map((x: string) => parseInt(x, 10));
298-
if (MAJOR < 4 || (MINOR == 2 && PATCH < 2)) {
298+
if (MAJOR < 4 || (MAJOR == 4 && (MINOR < 2 || (MINOR == 2 && PATCH < 2)))) {
299299
console.warn((`The --missing-translation parameter will be ignored because it is only `
300300
+ `compatible with Angular version 4.2.0 or higher. If you want to use it, please `
301301
+ `upgrade your Angular version.\n`));

0 commit comments

Comments
 (0)