Merge branch 'master' into master

This commit is contained in:
Oleg Lobanov 2022-06-13 12:46:18 +02:00 committed by GitHub
commit c461d10706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);