Skip to content

Commit 3ab0d02

Browse files
committed
fix(@schematics/update): add check for invalid ranges
Fixes angular#12644
1 parent 9da4bdc commit 3ab0d02

File tree

1 file changed

+3
-0
lines changed
  • packages/schematics/update/update

1 file changed

+3
-0
lines changed

packages/schematics/update/update/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ type PeerVersionTransform = string | ((range: string) => string);
3333
// We export it to allow for testing.
3434
export function angularMajorCompatGuarantee(range: string) {
3535
range = semver.validRange(range);
36+
if (range === null) {
37+
return null;
38+
}
3639
let major = 1;
3740
while (!semver.gtr(major + '.0.0', range)) {
3841
major++;

0 commit comments

Comments
 (0)