eslint: add no-shadow
This commit is contained in:
+7
-7
@@ -199,11 +199,11 @@ async function waitForLocations(locations, progressCallback) {
|
||||
}
|
||||
}
|
||||
|
||||
function makeWildcard(fqdn) {
|
||||
assert.strictEqual(typeof fqdn, 'string');
|
||||
function makeWildcard(recordFqdn) {
|
||||
assert.strictEqual(typeof recordFqdn, 'string');
|
||||
|
||||
// if the fqdn is like *.example.com, this function will do nothing
|
||||
const parts = fqdn.split('.');
|
||||
const parts = recordFqdn.split('.');
|
||||
parts[0] = '*';
|
||||
return parts.join('.');
|
||||
}
|
||||
@@ -262,15 +262,15 @@ async function registerLocations(locations, options, progressCallback) {
|
||||
if (ipv4) {
|
||||
await registerLocation(location, options, 'A', ipv4);
|
||||
} else {
|
||||
const [error, values] = await safe(getDnsRecords(location.subdomain, location.domain, 'A'));
|
||||
if (!error && values.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'A', values), { debug });
|
||||
const [aError, aValues] = await safe(getDnsRecords(location.subdomain, location.domain, 'A'));
|
||||
if (!aError && aValues.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'A', aValues), { debug });
|
||||
}
|
||||
|
||||
if (ipv6) {
|
||||
await registerLocation(location, options, 'AAAA', ipv6);
|
||||
} else {
|
||||
const [error, values] = await safe(getDnsRecords(location.subdomain, location.domain, 'AAAA'));
|
||||
if (!error && values.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'AAAA', values), { debug });
|
||||
const [aaaaError, aaaaValues] = await safe(getDnsRecords(location.subdomain, location.domain, 'AAAA'));
|
||||
if (!aaaaError && aaaaValues.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'AAAA', aaaaValues), { debug });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user