Skip to content

Commit 7a09792

Browse files
committed
Merge branch 'futa-ikeda/node-license-return' into hotfix/21.6.3
2 parents b3b7ca0 + d881101 commit 7a09792

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/transforms/node-license.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,15 @@ export default class NodeLicenseTransform extends Transform {
3030
});
3131
}
3232

33-
serialize(value: NodeLicense): SerializedNodeLicense {
33+
serialize(value: NodeLicense): SerializedNodeLicense | undefined {
3434
if (!value) {
3535
return {};
3636
}
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+
}
3742

3843
const {
3944
copyrightHolders = '',

0 commit comments

Comments
 (0)