We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b3b7ca0 + d881101 commit 7a09792Copy full SHA for 7a09792
app/transforms/node-license.ts
@@ -30,10 +30,15 @@ export default class NodeLicenseTransform extends Transform {
30
});
31
}
32
33
- serialize(value: NodeLicense): SerializedNodeLicense {
+ serialize(value: NodeLicense): SerializedNodeLicense | undefined {
34
if (!value) {
35
return {};
36
37
+ // Setting this to undefined will prevent nodelicense from being serialized
38
+ // in the draft registration metadata workflow if the user has not updated it.
39
+ if (Object.entries(value).length === 0) {
40
+ return undefined;
41
+ }
42
43
const {
44
copyrightHolders = '',
0 commit comments