Skip to content

Commit e3c780c

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

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

packages/schematics/update/update/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ 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) return false;
3637
let major = 1;
3738
while (!semver.gtr(major + '.0.0', range)) {
3839
major++;

0 commit comments

Comments
 (0)