Skip to content

Commit

Permalink
fix(cms-base): url prefix builder (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdanilowicz committed Oct 24, 2023
1 parent d60fb98 commit f636e5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-hotels-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-pwa/cms-base": patch
---

Fix url prefix builder
3 changes: 1 addition & 2 deletions packages/cms-base/helpers/buildUrlPrefix.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export default function buildUrlPrefix(url: string | any, prefix: string) {
url = url[0] !== "/" ? `/${url}` : url;

if (typeof url === "string") {
url = url[0] !== "/" ? `/${url}` : url;
return prefix ? `/${prefix}${url}` : url;
}
if (url.path && prefix) {
Expand Down

1 comment on commit f636e5a

@vercel
Copy link

@vercel vercel bot commented on f636e5a Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.