add check if cbFunc is function to focusModalWithElement()

This commit is contained in:
Simon Grim 2016-01-09 00:03:11 +05:00
parent 0599685df4
commit e94a813587

View File

@ -148,7 +148,8 @@ function resumeModal(event) {
function focusModalWithElement(elem, cbFunc, cbArg) {
if (elem.jquery ? elem.is('html *') : $(elem).is('html *')) {
cbFunc(cbArg);
if (typeof cbFunc === 'function')
cbFunc(cbArg);
return true;
}