Skip to content

Commit

Permalink
Fixes unchecked access to 'deploy' script on build (#8292)
Browse files Browse the repository at this point in the history
  • Loading branch information
renato-bohler committed Feb 8, 2020
1 parent cd2469e commit 767aa18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-dev-utils/printHostingInstructions.js
Expand Up @@ -22,7 +22,9 @@ function printHostingInstructions(
if (publicUrl && publicUrl.includes('.github.io/')) {
// "homepage": "http://user.github.io/project"
const publicPathname = url.parse(publicPath).pathname;
const hasDeployScript = typeof appPackage.scripts.deploy !== 'undefined';
const hasDeployScript =
typeof appPackage.scripts !== 'undefined' &&
typeof appPackage.scripts.deploy !== 'undefined';
printBaseMessage(buildFolder, publicPathname);

printDeployInstructions(publicUrl, hasDeployScript, useYarn);
Expand Down

0 comments on commit 767aa18

Please sign in to comment.