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: [M3-8164] - regions length check #10519

Merged
merged 3 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

fix regions length check in HostNameTableCell ([#10519](https://github.com/linode/manager/pull/10519))
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const HostNameTableCell = ({

const { regions } = storageKeyData;

if (!regionsLookup || !regionsData || !regions) {
if (!regionsLookup || !regionsData || !regions.length) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our length checks are normally more explicit, i.e., regions.length === 0.

Did UX share any ideas other than an empty cell for these cases? Maybe "None" or "N/A"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ for the explicit length check (regions.length === 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call @dwiley-akamai None makes sense to me. Looks like we are using it in VPC as well. However, I will confirm with UX and get back on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX is confirmed on showing 'None'.

return <TableCell />;
}

Expand Down
Loading