Merge pull request #178 from a110605/fix_error

Fix  undefined reading harvesterhci.io/storageClassName
This commit is contained in:
Andy Lee 2025-03-04 11:01:28 +08:00 committed by GitHub
commit d923239b9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -201,7 +201,7 @@ export default class HciVmImage extends HarvesterResource {
}
get imageStorageClass() {
return this?.metadata?.annotations[HCI_ANNOTATIONS.STORAGE_CLASS] || '';
return this?.metadata?.annotations?.[HCI_ANNOTATIONS.STORAGE_CLASS] || '';
}
get imageMessage() {