lib/modules: Fix freeform modules when there's no definitions

This commit is contained in:
Silvan Mosberger
2020-08-10 17:27:33 +02:00
parent 446d80d28d
commit e0ded8f4ba
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -104,7 +104,8 @@ rec {
file = def.file;
value = setAttrByPath def.prefix def.value;
}) merged.unmatchedDefns;
in declaredConfig._module.freeformType.merge prefix defs;
in if defs == [] then {}
else declaredConfig._module.freeformType.merge prefix defs;
in if declaredConfig._module.freeformType == null then declaredConfig
# Because all definitions that had an associated option ended in