From ceccd2a50de1960c09068cdde6f8b8f1bc7d7b4d Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 3 Jun 2020 11:38:10 +0200 Subject: [PATCH] Implements stronger check to make sure the object is a regexp --- api/js/framework/fw_base.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/framework/fw_base.js b/api/js/framework/fw_base.js index a200dc114d..a635f73694 100644 --- a/api/js/framework/fw_base.js +++ b/api/js/framework/fw_base.js @@ -885,7 +885,7 @@ var fw_base = (function(){ "use strict"; return Class.extend( { for (var j=0; j < popups.length; j++) { - if (typeof param === 'object' && !(param instanceof RegExp)) + if (typeof param === 'object' && param.constructor.name != 'RegExp') { var key = Object.keys(param)[0]; if (!popups[j][key].match(new RegExp(param[key]))) @@ -1165,7 +1165,7 @@ var fw_base = (function(){ "use strict"; return Class.extend( } } }, - + /** * Set a notification message for topmenu info item *