diff --git a/packages/manager/.changeset/pr-10555-upcoming-features-1717778847157.md b/packages/manager/.changeset/pr-10555-upcoming-features-1717778847157.md new file mode 100644 index 00000000000..607765079fb --- /dev/null +++ b/packages/manager/.changeset/pr-10555-upcoming-features-1717778847157.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Upcoming Features +--- + +Obj fix for crashing accesskey page when relevant customer tags are not added ([#10555](https://github.com/linode/manager/pull/10555)) diff --git a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable/HostNameTableCell.tsx b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable/HostNameTableCell.tsx index f9960f25f7a..e5fb3ce88db 100644 --- a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable/HostNameTableCell.tsx +++ b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyTable/HostNameTableCell.tsx @@ -28,7 +28,7 @@ export const HostNameTableCell = ({ const { regions } = storageKeyData; - if (!regionsLookup || !regionsData || regions.length === 0) { + if (!regionsLookup || !regionsData || !regions || regions.length === 0) { return None; } diff --git a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/OMC_AccessKeyDrawer.tsx b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/OMC_AccessKeyDrawer.tsx index f80df21f3b5..67897f5dbe6 100644 --- a/packages/manager/src/features/ObjectStorage/AccessKeyLanding/OMC_AccessKeyDrawer.tsx +++ b/packages/manager/src/features/ObjectStorage/AccessKeyLanding/OMC_AccessKeyDrawer.tsx @@ -156,8 +156,8 @@ export const OMC_AccessKeyDrawer = (props: AccessKeyDrawerProps) => { !createMode && objectStorageKey ? objectStorageKey.label : ''; const initialRegions = - !createMode && objectStorageKey - ? objectStorageKey.regions?.map((region) => region.id) + !createMode && objectStorageKey?.regions + ? objectStorageKey.regions.map((region) => region.id) : []; const initialValues: FormState = { @@ -184,7 +184,6 @@ export const OMC_AccessKeyDrawer = (props: AccessKeyDrawerProps) => { ), } : { ...values, bucket_access: null }; - const updatePayload = generateUpdatePayload(values, initialValues); if (mode !== 'creating') { @@ -203,7 +202,7 @@ export const OMC_AccessKeyDrawer = (props: AccessKeyDrawerProps) => { const isSaveDisabled = isRestrictedUser || (mode !== 'creating' && - objectStorageKey && + objectStorageKey?.regions && !hasLabelOrRegionsChanged(formik.values, objectStorageKey)) || (mode === 'creating' && limitedAccessChecked &&