Skip to content

Commit

Permalink
wp-now: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
sejas committed Jun 20, 2023
1 parent 83b77e2 commit 9cdae2a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/wp-now/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export interface WPEnvOptions {
mappings: Object;
}

let absoluteUrlFromBlueprint = ''
let absoluteUrlFromBlueprint = '';

async function getAbsoluteURL() {
const port = await portFinder.getOpenPort();
Expand Down Expand Up @@ -164,23 +164,23 @@ export default async function getWpNowConfig(
options.absoluteUrl = siteUrl;
absoluteUrlFromBlueprint = siteUrl;
}

}
return options;
}


function extractSiteUrlFromBlueprint(blueprintObject: Blueprint): string | false {
function extractSiteUrlFromBlueprint(
blueprintObject: Blueprint
): string | false {
for (const step of blueprintObject.steps) {
if (typeof step !== 'object') {
return false;
}

if (step.step === 'defineSiteUrl') {
return `${step.siteUrl}`;
}else if (
step.step === 'defineWpConfigConsts' &&
step.consts.WP_SITEURL
} else if (
step.step === 'defineWpConfigConsts' &&
step.consts.WP_SITEURL
) {
return `${step.consts.WP_SITEURL}`;
}
Expand Down

0 comments on commit 9cdae2a

Please sign in to comment.