[FIX] Backport: OptionalView fixDependencies

This commit is contained in:
Gravita 2024-07-21 20:10:58 +07:00
parent c76e451210
commit 85938d4d38
No known key found for this signature in database
GPG key ID: 543A8F335C9CD633

View file

@ -88,7 +88,7 @@ public Set<OptionalAction> getEnabledActions() {
public void fixDependencies() {
Set<OptionalFile> disabled = all.stream().filter(t -> !isEnabled(t)).collect(Collectors.toSet());
for (OptionalFile file : disabled) {
if (file.group != null && Arrays.stream(file.group).noneMatch(this::isEnabled)) {
if (file.group != null && file.group.length > 0 && Arrays.stream(file.group).noneMatch(this::isEnabled)) {
enable(file.group[0], false, null);
}
}