Skip to content

Commit

Permalink
Update packages/td-tools/src/td-parser.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Romann <[email protected]>
  • Loading branch information
danielpeintner and JKRhb authored Sep 12, 2023
1 parent 9a667e3 commit 59d04b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/td-tools/src/td-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export function serializeTD(thing: Thing): string {
const copy = JSON.parse(JSON.stringify(thing));

// clean-ups
if (copy.security === undefined || copy.security.length === 0) {
if (copy?.security.length === 0) {
copy.securityDefinitions = {
nosec_sc: { scheme: "nosec" },
};
Expand Down

0 comments on commit 59d04b9

Please sign in to comment.