Skip to content
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

Merged
merged 6 commits into from
Jul 5, 2023
Merged

FIX: Null domain name #2091

merged 6 commits into from
Jul 5, 2023

Conversation

finnar-bin
Copy link
Contributor

Fixed bug where some instances which has no domain names causes the app to crash when the instance menu is opened
Closes #2073

image

@finnar-bin finnar-bin self-assigned this Jun 26, 2023
Copy link
Contributor

@agalin920 agalin920 left a 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

Copy link
Contributor

@agalin920 agalin920 left a 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

@@ -17,11 +21,13 @@ export function useDomain() {
*/

const prodDomains = state.instance.domains
Copy link
Contributor

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

Copy link
Contributor Author

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

@finnar-bin finnar-bin added the ready PR is complete and ready for deployment label Jul 4, 2023
@shrunyan shrunyan merged commit 2b0be5d into master Jul 5, 2023
@shrunyan shrunyan deleted the fix/2073-null-domain-name branch July 5, 2023 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR is complete and ready for deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read properties of null (reading 'replace')
3 participants