Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixes unchecked access to 'deploy' script on build
  • Loading branch information
renato-bohler committed Jan 8, 2020
commit fe7904ae59a197868870bbea9b311ffa5d762494
4 changes: 3 additions & 1 deletion packages/react-dev-utils/printHostingInstructions.js
Original file line number Diff line number Diff line change
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