fix: only push a record if we have a content response

This commit is contained in:
Derrick Hammer 2023-10-26 12:46:30 -04:00
parent 86c9f02f5b
commit 65dffe202e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 4 deletions

View File

@ -93,11 +93,13 @@ export default class Eth extends AbstractResolverModule {
return resolverError(e); return resolverError(e);
} }
if (content) {
records.push({ records.push({
type: DNS_RECORD_TYPE.CONTENT, type: DNS_RECORD_TYPE.CONTENT,
value: `${content.protocolType}://${content.decoded}` as string, value: `${content.protocolType}://${content.decoded}` as string,
}); });
} }
}
if ([DNS_RECORD_TYPE.CUSTOM].includes(options.type)) { if ([DNS_RECORD_TYPE.CUSTOM].includes(options.type)) {
let text; let text;