fix undefined reading harvesterhci.io/storageClassName

Signed-off-by: Andy Lee <andy.lee@suse.com>
(cherry picked from commit 54f85963ea8d4b6bee66c56885f8bb6f34f75741)
This commit is contained in:
Andy Lee 2025-03-04 10:59:35 +08:00 committed by Mergify
parent 6b8b1f68eb
commit 45c0dce61b

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() {