-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix how URL concatenation works #419
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to merge after the fix
Co-authored-by: Konsti Wohlwend <[email protected]>
@@ -12,8 +13,8 @@ export function isValidUrl(url: string) { | |||
return !!createUrlIfValid(url); | |||
} | |||
|
|||
export function isLocalhost(urlOrString: string | URL) { | |||
const url = createUrlIfValid(urlOrString); | |||
export function isLocalhost(urlOrString: URL | string | null | undefined) { ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the stray semicolon after the function opening. Also, consider adding a brief comment on why the function now accepts null/undefined.
export function isLocalhost(urlOrString: URL | string | null | undefined) { ; | |
export function isLocalhost(urlOrString: URL | string | null | undefined) { |
export function isLocalhost(urlOrString: string | URL) { | ||
const url = createUrlIfValid(urlOrString); | ||
export function isLocalhost(urlOrString: URL | string | null | undefined) { ; | ||
const url = typeof urlOrString === "string" ? createUrlIfValid(urlOrString) : urlOrString; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted it to its original implementation, my branch had a broken implementation for some reason before
Important
Replaces URL concatenation with
urlString
template literal tag inStackServerInterface
for improved URL handling and encoding.urlString
template literal tag inStackServerInterface
methods for encoding values.getServerUserById
,listServerTeamInvitations
, andrevokeServerTeamInvitation
.urlString
function inurls.tsx
for URL string creation with encoding.templateIdentity
instrings.tsx
to simplify string concatenation logic.process-css.ts
to use template literals forglobalCSS
export.This description was created by
for 31d071b. It will automatically update as commits are pushed.