Skip to content

Commit

Permalink
fix: only run list option check if not null
Browse files Browse the repository at this point in the history
  • Loading branch information
Sculas committed Sep 7, 2022
1 parent 8512037 commit 4055939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/app/revanced/patcher/patch/PatchOption.kt
Expand Up @@ -158,7 +158,7 @@ sealed class PatchOption<T>(
}
) {
init {
if (default !in options) {
if (default != null && default !in options) {
throw IllegalStateException("Default option must be an allowed option")
}
}
Expand Down Expand Up @@ -227,4 +227,4 @@ sealed class PatchOption<T>(
validator(it?.toFile())
}
)
}
}

0 comments on commit 4055939

Please sign in to comment.