Skip to content

Commit ee3e2a3

Browse files
committed
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.
1 parent ab8d197 commit ee3e2a3

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

Lines changed: 4 additions & 0 deletions
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)