Skip to content

Commit 0474830

Browse files
committed
Adjust to use the same logic in if condition.
1 parent f0c3d05 commit 0474830

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web/js/pages/add_web.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ App.Listeners.WEB.keypress_domain_name();
173173

174174
$(function() {
175175
$('#v_domain').change(function() {
176-
if (((document.getElementById('v_domain').value).split(".")).length === 2) {
177-
var prefix = 'www.';
178-
document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value;
179-
} else {
176+
var prefix = 'www.';
177+
if (((document.getElementById('v_domain').value).split(".")).length > 2) {
180178
document.getElementById('v_aliases').value = "";
179+
} else {
180+
document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value;
181181
}
182182
});
183183
App.Actions.WEB.toggle_letsencrypt($('input[name=v_letsencrypt]'))

0 commit comments

Comments
 (0)