mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-04 03:51:44 +02:00
Support string-based url.path in Postman importer. (#490)
This commit is contained in:
@@ -180,8 +180,12 @@ function convertUrl(rawUrl: unknown): Pick<HttpRequest, "url" | "urlParameters">
|
||||
v += `:${url.port}`;
|
||||
}
|
||||
|
||||
if ("path" in url && Array.isArray(url.path) && url.path.length > 0) {
|
||||
v += `/${Array.isArray(url.path) ? url.path.join("/") : url.path}`;
|
||||
if ("path" in url) {
|
||||
if (Array.isArray(url.path) && url.path.length > 0) {
|
||||
v += `/${url.path.join("/")}`;
|
||||
} else if (typeof url.path === "string" && url.path.length > 0) {
|
||||
v += `/${url.path.replace(/^\//, "")}`;
|
||||
}
|
||||
}
|
||||
|
||||
const params: HttpUrlParameter[] = [];
|
||||
|
||||
Reference in New Issue
Block a user