Skip to content

Commit

Permalink
refactor: access baseURL config only once
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Nov 30, 2024
1 parent d10dc05 commit d42f405
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/transformers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ export async function run(html = '', config = {}) {
*
* Add a base URL to relative paths.
*/
if (get(config, 'baseURL', get(config, 'baseUrl'))) {
const baseConfig = get(config, 'baseURL', get(config, 'baseUrl'))
if (baseConfig) {
posthtmlPlugins.push(
baseUrl(get(config, 'baseURL', get(config, 'baseUrl', {})))
baseUrl(baseConfig)
)
}

Expand Down

0 comments on commit d42f405

Please sign in to comment.