Fix BUG 61061 - Files. ‘Cannot Read Properties of Undefined (Reading 'Trim')’ when opening a file.

This commit is contained in:
Alexey Safronov 2023-03-01 14:27:51 +04:00
parent f04408ace1
commit 67e0b6a65d

View File

@ -2,6 +2,7 @@ const combineUrl = (host = "", ...params) => {
let url = host.replace(/\/+$/, "");
params.forEach((part) => {
if (!part) return;
const newPart = part.trim().replace(/^\/+/, "");
url += newPart
? url.length > 0 && url[url.length - 1] === "/"