From d3b7d12860ca3003cddb86e39a7443aca6807009 Mon Sep 17 00:00:00 2001 From: Rich Patulski Date: Sun, 12 Dec 2021 10:48:39 -0500 Subject: [PATCH] add small fixes --- src/core/operations/DNSOverHTTPS.mjs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/operations/DNSOverHTTPS.mjs b/src/core/operations/DNSOverHTTPS.mjs index c426f991..b564b164 100644 --- a/src/core/operations/DNSOverHTTPS.mjs +++ b/src/core/operations/DNSOverHTTPS.mjs @@ -20,7 +20,7 @@ class DNSOverHTTPS extends Operation { this.name = "DNS over HTTPS"; this.module = "Default"; this.description = [ - "Takes one or more FQDN seperated by newlines and performs a DNS lookup using DNS over HTTPS.", + "Takes one or more FQDN(s) that are seperated by newlines, and performs a DNS lookup using DNS over HTTPS.", "

", "By default, Cloudflare and Google DNS over HTTPS services are supported.", "

", @@ -101,11 +101,14 @@ class DNSOverHTTPS extends Operation { if (justAnswer) { if (data.Answer) { return extractData(data.Answer); - } - else { - let r = {}; - r[data.Question[0].name] = null; - return r; + } else { + if(data.Question.length > 0){ + let r = {}; + r[data.Question[0].name] = null; + return r; + } else { + return null; + } } } else { return data;