Skip to content

Commit 767aa18

Browse files
authoredFeb 8, 2020
Fixes unchecked access to 'deploy' script on build (#8292)
1 parent cd2469e commit 767aa18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎packages/react-dev-utils/printHostingInstructions.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ function printHostingInstructions(
2222
if (publicUrl && publicUrl.includes('.github.io/')) {
2323
// "homepage": "http://user.github.io/project"
2424
const publicPathname = url.parse(publicPath).pathname;
25-
const hasDeployScript = typeof appPackage.scripts.deploy !== 'undefined';
25+
const hasDeployScript =
26+
typeof appPackage.scripts !== 'undefined' &&
27+
typeof appPackage.scripts.deploy !== 'undefined';
2628
printBaseMessage(buildFolder, publicPathname);
2729

2830
printDeployInstructions(publicUrl, hasDeployScript, useYarn);

0 commit comments

Comments
 (0)
Please sign in to comment.