Skip to content

Commit 971f249

Browse files
mrmckebianschmitz
authored andcommitted
refactor: remove double coerce (#7882)
1 parent 324428f commit 971f249

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/create-react-app/createReactApp.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ function run(
443443
)
444444
.then(({ isOnline, packageInfo, templateInfo }) => {
445445
let packageVersion = semver.coerce(packageInfo.version);
446+
447+
// This environment variable can be removed post-release.
446448
const templatesVersionMinimum = process.env.CRA_INTERNAL_TEST
447449
? '3.2.0'
448450
: '3.3.0';
@@ -454,7 +456,7 @@ function run(
454456

455457
// Only support templates when used alongside new react-scripts versions.
456458
const supportsTemplates = semver.gte(
457-
semver.coerce(packageVersion),
459+
packageVersion,
458460
templatesVersionMinimum
459461
);
460462
if (supportsTemplates) {

0 commit comments

Comments
 (0)