Merge pull request #113 from harvester/mergify/bp/release-harvester-v1.5/pr-110

Prevent display lock icon if this.volumes is empty array (backport #110)
This commit is contained in:
Andy Lee 2025-02-06 12:25:26 +08:00 committed by GitHub
commit bbfeb55af9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -640,6 +640,10 @@ export default class VirtVm extends HarvesterResource {
}
get encryptedVolumeType() {
if (!this.volumes || this.volumes.length === 0) {
return 'none';
}
if (this.volumes.every((vol) => vol.isEncrypted)) {
return 'all';
} else if (this.volumes.some((vol) => vol.isEncrypted)) {