Implements stronger check to make sure the object is a regexp

This commit is contained in:
Hadi Nategh 2020-06-03 11:38:10 +02:00
parent 6a7bbb40fe
commit ceccd2a50d

View File

@ -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
*