make hash nullable

This commit is contained in:
Chloe committed 2026-08-15 13:50:03 -07:00
1 parent 2bab7d9c21
commit c42d65cef7
1 file changed
+3 -3
@@ -33,7 +33,7 @@ data class Release(
@Serializable
data class LoaderPlatformDownload(
val url: String,
val hash: String, // blank if hash is not present
val hash: String?,
)
@Serializable
@@ -197,7 +197,7 @@ class DownloadableLoaderRelease(private val version: LoaderVersion) : Downloadab
return DownloadableAsset(
url = data.url,
filename = filename,
hash = data.hash.takeUnless { it.isEmpty() }
hash = data.hash,
)
}
@@ -207,7 +207,7 @@ class DownloadableLoaderRelease(private val version: LoaderVersion) : Downloadab
return DownloadableAsset(
url = data.url,
filename = filename,
hash = data.hash.takeUnless { it.isEmpty() },
hash = data.hash,
)
}
}