gitea push
This commit is contained in:
+2
-2
@@ -288,8 +288,8 @@ function withoutBase(input, base) {
|
||||
if (nextChar && nextChar !== "/" && nextChar !== "?") {
|
||||
return input;
|
||||
}
|
||||
const trimmed = input.slice(_base.length);
|
||||
return trimmed[0] === "/" ? trimmed : "/" + trimmed;
|
||||
const trimmed = input.slice(_base.length).replace(/^\/+/, "");
|
||||
return "/" + trimmed;
|
||||
}
|
||||
function withQuery(input, query) {
|
||||
const parsed = parseURL(input);
|
||||
|
||||
+1
-1
@@ -529,7 +529,7 @@ declare function isEmptyURL(url: string): boolean;
|
||||
*
|
||||
* @group utils
|
||||
*/
|
||||
declare function isNonEmptyURL(url: string): boolean;
|
||||
declare function isNonEmptyURL(url: string): boolean | "";
|
||||
/**
|
||||
* Joins multiple URL segments into a single URL.
|
||||
*
|
||||
|
||||
+1
-1
@@ -529,7 +529,7 @@ declare function isEmptyURL(url: string): boolean;
|
||||
*
|
||||
* @group utils
|
||||
*/
|
||||
declare function isNonEmptyURL(url: string): boolean;
|
||||
declare function isNonEmptyURL(url: string): boolean | "";
|
||||
/**
|
||||
* Joins multiple URL segments into a single URL.
|
||||
*
|
||||
|
||||
+1
-1
@@ -529,7 +529,7 @@ declare function isEmptyURL(url: string): boolean;
|
||||
*
|
||||
* @group utils
|
||||
*/
|
||||
declare function isNonEmptyURL(url: string): boolean;
|
||||
declare function isNonEmptyURL(url: string): boolean | "";
|
||||
/**
|
||||
* Joins multiple URL segments into a single URL.
|
||||
*
|
||||
|
||||
+2
-2
@@ -286,8 +286,8 @@ function withoutBase(input, base) {
|
||||
if (nextChar && nextChar !== "/" && nextChar !== "?") {
|
||||
return input;
|
||||
}
|
||||
const trimmed = input.slice(_base.length);
|
||||
return trimmed[0] === "/" ? trimmed : "/" + trimmed;
|
||||
const trimmed = input.slice(_base.length).replace(/^\/+/, "");
|
||||
return "/" + trimmed;
|
||||
}
|
||||
function withQuery(input, query) {
|
||||
const parsed = parseURL(input);
|
||||
|
||||
Reference in New Issue
Block a user