修复BUG:autoValidate方法第二个参数没写时报错,增加判断兼容以前写的方法

This commit is contained in:
Argo-Lenovo 2016-11-17 15:16:49 +08:00
parent 5392423fef
commit 1c41e82d60
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@
$(element).popover('show');
}
});
if ($.isArray(handler.button)) {
if (handler && $.isArray(handler.button)) {
$.each(handler.button, function (index, btn) {
$('#' + btn).on('click', function () {
$(this).attr('data-valid', $this.valid());