Merge pull request #110 from a110605/issue_7510

Prevent display lock icon if this.volumes is empty array
This commit is contained in:
Andy Lee 2025-02-06 11:47:35 +08:00 committed by GitHub
commit 5c96e90d58
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)) {