Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Davies committed May 15, 2022
1 parent 5a61e29 commit 954595a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/env/lib/config/parse-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ function parseSourceString( sourceString, { workDirectoryPath } ) {
/^([^\/]+)\/([^#\/]+)(\/([^#]+))?(?:#(.+))?$/
);

if ( ! gitHubFields[ 5 ] && gitHubFields[ 1 ] === 'WordPress' ) {
if (
gitHubFields &&
! gitHubFields[ 5 ] &&
gitHubFields[ 1 ] === 'WordPress'
) {
gitHubFields[ 5 ] =
gitHubFields[ 2 ] === 'WordPress' ? 'master' : 'trunk';
}
Expand Down

0 comments on commit 954595a

Please sign in to comment.