From ee3e2a37936a59f8ca23d9375ac53dc7314618dd Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 22 Aug 2019 20:27:13 -0400 Subject: [PATCH] fix(@angular-devkit/build-angular): default poll value when not present `--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. --- .../build_angular/src/utils/normalize-builder-schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts b/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts index 47e663088ba0..6941e7d2ad04 100644 --- a/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts +++ b/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts @@ -65,5 +65,9 @@ export function normalizeBrowserSchema( || [], }, lazyModules: options.lazyModules || [], + // Using just `--poll` will result in a value of 0 which is very likely not the intention + // A value of 0 is falsy and will disable polling rather then enable + // 500 ms is a sensible default in this case + poll: options.poll === 0 ? 500 : options.poll, }; }