Skip to content

Commit

Permalink
fix(@schematics/update): add check for invalid ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrugg committed Dec 10, 2018
1 parent 9da4bdc commit 3ab0d02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/schematics/update/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ type PeerVersionTransform = string | ((range: string) => string);
// We export it to allow for testing.
export function angularMajorCompatGuarantee(range: string) {
range = semver.validRange(range);
if (range === null) {
return null;
}
let major = 1;
while (!semver.gtr(major + '.0.0', range)) {
major++;
Expand Down

0 comments on commit 3ab0d02

Please sign in to comment.