Unverified Commit 67c22bba authored by Ben Siraphob's avatar Ben Siraphob Committed by GitHub
Browse files

lib/modules: skip optional + ++ in evalOptionValue when no default (#510028)

parents a3a6c03f 1bec8475
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -1121,11 +1121,16 @@ let
    let
      # Add in the default value for this option, if any.
      defs' =
        (optional (opt ? default) {
        if opt ? default then
          [
            {
              file = head opt.declarations;
              value = mkOptionDefault opt.default;
        })
        ++ defs;
            }
          ]
          ++ defs
        else
          defs;

      # Handle properties, check types, and merge everything together.
      res =