Fixed contact

This commit is contained in:
labcode-de 2018-03-21 18:32:23 +01:00
parent 04d0732a3c
commit 2288895232
No known key found for this signature in database
GPG Key ID: 9CDB093B80490C2F

View File

@ -9,8 +9,9 @@ function getParameterByName(name, url) {
} }
$(function () { $(function () {
const param_rcp = getParameterByName('rcp') const param_rcp = getParameterByName('rcp')
if(param_rcp !== "") { if(param_rcp !== "" && param_rcp !== null && param_rcp !== undefined) {
const rcp_option = $('#recipient>option[value=' + param_rcp + ']'); const rcp_option = $('#recipient>option[value=' + param_rcp + ']');
console.log(param_rcp)
if(rcp_option.length === 1) { if(rcp_option.length === 1) {
rcp_option.attr('selected', true); rcp_option.attr('selected', true);
$('#recipient_option_choose').removeAttr('selected'); $('#recipient_option_choose').removeAttr('selected');