mirror of
https://github.com/cdr/code-server.git
synced 2025-12-08 01:12:40 +01:00
Use ?? for base default
This commit is contained in:
parent
10c2b956ac
commit
3badf6bf7b
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ export const trimSlashes = (url: string): string => {
|
|||
export const resolveBase = (base?: string): string => {
|
||||
// After resolving the base will either start with / or be an empty string.
|
||||
if (!base || base.startsWith("/")) {
|
||||
return base || ""
|
||||
return base ?? ""
|
||||
}
|
||||
const parts = location.pathname.split("/")
|
||||
parts[parts.length - 1] = base
|
||||
|
|
|
|||
Loading…
Reference in a new issue