feat(jsonschema): remove 'default' if 'defaultText' is present
default is likely to contain an error thunk if defaultText is set including it into $exportedModuleInfo makes it non-serializable
This commit is contained in:
@@ -100,9 +100,12 @@ rec {
|
||||
defaultText ? null,
|
||||
...
|
||||
}@attrs:
|
||||
let
|
||||
sanitizedAttrs = removeAttrs attrs (lib.optionals (defaultText != null) [ "default" ]);
|
||||
in
|
||||
{
|
||||
"$exportedModuleInfo" =
|
||||
attrs
|
||||
sanitizedAttrs
|
||||
// {
|
||||
inherit path required;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user