diff --git a/packages/td-tools/src/td-parser.ts b/packages/td-tools/src/td-parser.ts index bc2b835b4..6612767aa 100644 --- a/packages/td-tools/src/td-parser.ts +++ b/packages/td-tools/src/td-parser.ts @@ -269,7 +269,7 @@ export function serializeTD(thing: Thing): string { delete copy.events; } - if (copy.links !== undefined && copy.links.length === 0) { + if (copy?.links.length === 0) { delete copy.links; }