From a7a4d669e92d05aa36830816eb0cd4c3c881348f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabolcs=20Sz=C3=A9kelyi?= Date: Mon, 27 Nov 2023 14:10:35 -0500 Subject: [PATCH] Fix TXT record encoding (#36) Co-authored-by: Andreas Bauer --- src/coder/records/TXTRecord.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coder/records/TXTRecord.ts b/src/coder/records/TXTRecord.ts index 0252c53..bdc353c 100644 --- a/src/coder/records/TXTRecord.ts +++ b/src/coder/records/TXTRecord.ts @@ -19,7 +19,7 @@ export class TXTRecord extends ResourceRecord { super(name); } - this.txt = txt; + this.txt = txt.length === 0 ? [Buffer.from([])] : txt; } protected getRDataEncodingLength(): number {