diff --git a/src/dns/namecheap.js b/src/dns/namecheap.js index 95e07812b..e2bc2f7a8 100644 --- a/src/dns/namecheap.js +++ b/src/dns/namecheap.js @@ -144,14 +144,14 @@ async function upsert(domainObject, subdomain, type, values) { const result = await getZone(domainConfig, zoneName); // Array to keep track of records that need to be inserted - let toInsert = []; + const toInsert = []; for (let i = 0; i < values.length; i++) { - let curValue = values[i]; + const curValue = values[i]; let wasUpdate = false; for (let j = 0; j < result.length; j++) { - let curHost = result[j]; + const curHost = result[j]; if (curHost.Type === type && curHost.Name === subdomain) { // Updating an already existing host @@ -167,7 +167,7 @@ async function upsert(domainObject, subdomain, type, values) { // We don't have this host at all yet, let's push to toInsert array if (!wasUpdate) { - let newRecord = { + const newRecord = { RecordType: type, HostName: subdomain, Address: curValue @@ -226,7 +226,7 @@ async function del(domainObject, subdomain, type, values) { const originalLength = result.length; for (let i = 0; i < values.length; i++) { - let curValue = values[i]; + const curValue = values[i]; result = result.filter(curHost => curHost.Type !== type || curHost.Name !== subdomain || curHost.Address !== curValue); }