Fix #11821 TypeError: $this_function.val(...) is null

Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
This commit is contained in:
Atul Pratap Singh 2016-01-05 16:32:22 +05:30
parent cedc7a442c
commit e4c194ccde
2 changed files with 7 additions and 1 deletions

View File

@ -465,6 +465,9 @@ function PMA_addDatepicker($this_element, type, options)
onClose: function (dateText, dp_inst) {
// The value is no more from the date picker
$this_element.data('comes_from', '');
if (typeof $this_element.data('datepicker') !== 'undefined') {
$this_element.data('datepicker').inline = false;
}
}
};
if (type == "datetime" || type == "timestamp") {

View File

@ -168,7 +168,10 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType)
var $this_function = $("select[name='funcs[multi_edit][" + multi_edit + "][" +
urlField + "]']");
var function_selected = false;
if (typeof $this_function.val() !== 'undefined' && $this_function.val().length > 0) {
if (typeof $this_function.val() !== 'undefined'
&& $this_function.val() !== null
&& $this_function.val().length > 0
) {
function_selected = true;
}