Skip to content

Commit

Permalink
Fixes #2562
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 15, 2022
1 parent 8ab30f1 commit 27f54aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ module.exports = function (config) {

// Add pathPrefix manually to a URL
config.addFilter("url", function addPathPrefix(url, pathPrefixOverride) {
let pathPrefix = pathPrefixOverride || templateConfig.getPathPrefix();
let pathPrefix;
if (pathPrefixOverride && typeof pathPrefixOverride === "string") {
pathPrefix = pathPrefixOverride;
} else {
pathPrefix = templateConfig.getPathPrefix();
}

return urlFilter.call(this, url, pathPrefix);
});

Expand Down

0 comments on commit 27f54aa

Please sign in to comment.