diff -u b/core/misc/states.es6.js b/core/misc/states.es6.js --- b/core/misc/states.es6.js +++ b/core/misc/states.es6.js @@ -253,26 +253,16 @@ // shouldn't normally occur, but in case the condition definition is // bogus, we don't want to end up with an infinite loop. else if ($.isPlainObject(constraints)) { - // This constraint is an object (AND). - Object.keys(constraints).some((constraint) => { - result = ternary( - result, - this.checkConstraints( - constraints[constraint], - selector, - constraint, - ), - ); - /** - * False and anything else will evaluate to false, so return true when - * any false condition is found to break out of the .some loop. - */ - if (result === false) { - return true; - } - // Continue checking constraints. - return false; - }); + // This constraint is an object (AND). The ternary function will return + // true if the result of checking the constraint is undefined. + result = Object.keys(constraints).every(constraint => ternary( + true, + this.checkConstraints( + constraints[constraint], + selector, + constraint, + ), + )); } return result; }, diff -u b/core/misc/states.js b/core/misc/states.js --- b/core/misc/states.js +++ b/core/misc/states.js @@ -128,14 +128,8 @@ } } } else if ($.isPlainObject(constraints)) { - Object.keys(constraints).some(function (constraint) { - result = ternary(result, _this3.checkConstraints(constraints[constraint], selector, constraint)); - - if (result === false) { - return true; - } - - return false; + result = Object.keys(constraints).every(function (constraint) { + return ternary(true, _this3.checkConstraints(constraints[constraint], selector, constraint)); }); } return result;