constness

This commit is contained in:
Girish Ramakrishnan
2022-04-14 17:41:41 -05:00
parent 685bda35b9
commit 05d7a7f496
25 changed files with 75 additions and 77 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ function validateHostname(subdomain, domainObject) {
if (hostname === settings.dashboardFqdn()) return new BoxError(BoxError.BAD_FIELD, `subdomain '${subdomain}' is reserved`);
// workaround https://github.com/oncletom/tld.js/issues/73
var tmp = hostname.replace('_', '-');
const tmp = hostname.replace('_', '-');
if (!tld.isValid(tmp)) return new BoxError(BoxError.BAD_FIELD, 'Hostname is not a valid domain name');
if (hostname.length > 253) return new BoxError(BoxError.BAD_FIELD, 'Hostname length exceeds 253 characters');