-
Notifications
You must be signed in to change notification settings - Fork 6
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: Null domain name #2091
FIX: Null domain name #2091
Conversation
… has no domain configured
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.
If there is no domain then there is no point of rendering the Link
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.
Don't we also need a type change on the useDomain hook to convey that it can be undefined?
Or we can have it return an empty string so that the type is always ensured
We want to avoid this issue in the future
src/shell/hooks/use-domain.ts
Outdated
@@ -17,11 +21,13 @@ export function useDomain() { | |||
*/ | |||
|
|||
const prodDomains = state.instance.domains |
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.
Its easier to define this as Domain[] than need to define Domain in every array method
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.
Added the type declaration at the top
Fixed bug where some instances which has no domain names causes the app to crash when the instance menu is opened
Closes #2073