From e94a8135871b1e6d00dd6b58af0bbfee9b5ea789 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Sat, 9 Jan 2016 00:03:11 +0500 Subject: [PATCH] add check if cbFunc is function to focusModalWithElement() --- js/interface_common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/interface_common.js b/js/interface_common.js index 197fee9..45ba036 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -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; }