Skip to content

Commit

Permalink
fix: Do not set patch fields if they are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 22, 2023
1 parent 0447fa9 commit a76ac04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/app/revanced/patcher/patch/Patch.kt
Expand Up @@ -65,7 +65,8 @@ sealed class Patch<out T : Context<*>> {
name = annotation.name.ifEmpty { null }
description = annotation.description.ifEmpty { null }
compatiblePackages = annotation.compatiblePackages
.map { CompatiblePackage(it.name, it.versions.toSet()) }.toSet()
.map { CompatiblePackage(it.name, it.versions.toSet().ifEmpty { null }) }
.toSet().ifEmpty { null }
dependencies = annotation.dependencies.toSet().ifEmpty { null }
use = annotation.use
requiresIntegrations = annotation.requiresIntegrations
Expand Down

0 comments on commit a76ac04

Please sign in to comment.