Skip to content

Commit

Permalink
fix: preview url building fix (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
princemaple committed Jun 10, 2022
1 parent c211b96 commit dcf0bc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/api/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function removePrefix(url) {

export function createURL(endpoint, params = {}, auth = true) {
let prefix = baseURL;
if (prefix[prefix.length] !== "/") {
if (!prefix.endsWith("/")) {
prefix = prefix + "/";
}
const url = new URL(prefix + encodePath(endpoint), origin);
Expand Down

0 comments on commit dcf0bc6

Please sign in to comment.