Avoid failure of nextmatch check with widgets without parents

This commit is contained in:
Nathan Gray 2016-03-09 22:05:49 +00:00
parent cd1f03c761
commit fd2bf095aa

View File

@ -1116,9 +1116,9 @@ jQuery.extend(et2_selectbox, //(function(){ "use strict"; return
if(typeof cache === 'undefined' || typeof cache.length === 'undefined')
{
var parent = widget._parent;
while(parent !== null && !in_nextmatch)
while(parent && !in_nextmatch)
{
in_nextmatch = (parent._type === 'nextmatch')
in_nextmatch =(parent && parent._type && parent._type === 'nextmatch')
parent = parent._parent;
}
}