Skip to content

Commit af9a8b7

Browse files
clydinmgechev
authored andcommitted
fix(@angular-devkit/build-angular): default poll value when not present (#15417)
`--poll` is a valid command line option (vs. `--poll 1000`). This however will result in a value of 0 which causes polling to be disabled rather than enabled. This change sets a default value of 500 when the commandline flag is used.
1 parent 7f6ba9e commit af9a8b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts

+4
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,9 @@ export function normalizeBrowserSchema(
6565
|| [],
6666
},
6767
lazyModules: options.lazyModules || [],
68+
// Using just `--poll` will result in a value of 0 which is very likely not the intention
69+
// A value of 0 is falsy and will disable polling rather then enable
70+
// 500 ms is a sensible default in this case
71+
poll: options.poll === 0 ? 500 : options.poll,
6872
};
6973
}

0 commit comments

Comments
 (0)