Skip to content

Commit 5782db3

Browse files
committed
fix: add check for range === null in angularMajorCompatGuarantee
fixes angular#12644
1 parent f52f043 commit 5782db3

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 false;
38+
}
3639
let major = 1;
3740
while (!semver.gtr(major + '.0.0', range)) {
3841
major++;

0 commit comments

Comments
 (0)