Library should not be clickable if spdx is blank

This commit is contained in:
Stypox 2024-11-27 15:46:39 +01:00
parent a25034b898
commit 72f054a4fa
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ fun Library(
showLicenseDialog: (licenseFilename: String) -> Unit, showLicenseDialog: (licenseFilename: String) -> Unit,
descriptionMaxLines: Int, descriptionMaxLines: Int,
) { ) {
val spdxLicense = library.licenses.firstOrNull()?.spdxId val spdxLicense = library.licenses.firstOrNull()?.spdxId?.takeIf { it.isNotBlank() }
val licenseAssetPath = spdxLicense?.let { SPDX_ID_TO_ASSET_PATH[it] } val licenseAssetPath = spdxLicense?.let { SPDX_ID_TO_ASSET_PATH[it] }
val context = LocalContext.current val context = LocalContext.current