Skip to content

Commit

Permalink
fix: wrong conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeintner committed Sep 20, 2023
1 parent a04d8c7 commit 25d5390
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.length === 0) {
if (copy.security == null || copy.security.length === 0) {
copy.securityDefinitions = {
nosec_sc: { scheme: "nosec" },
};
Expand Down

0 comments on commit 25d5390

Please sign in to comment.