diff --git a/static/js/rules/RuleUtils.js b/static/js/rules/RuleUtils.js index 8fbaf6785..6b2ba0998 100644 --- a/static/js/rules/RuleUtils.js +++ b/static/js/rules/RuleUtils.js @@ -30,9 +30,16 @@ const RuleUtils = { console.warn('byProperty property undefined', new Error().stack); return false; } - + const propHref = `/things/${encodeURIComponent(property.thing)}/properties/${encodeURIComponent( + property.id + )}`; const optProp = option.properties[property.id]; - return optProp && optProp.forms && optProp.forms.length; + return ( + optProp && + optProp.forms.filter((f) => { + return f.href === propHref; + }).length > 0 + ); }, // Helper function for selecting the thing corresponding to an href byThing: (thing) => (otherThing) => {