diff --git a/src/utils/match-props.js b/src/utils/match-props.js
index e81e096..79b5526 100644
--- a/src/utils/match-props.js
+++ b/src/utils/match-props.js
@@ -5,6 +5,9 @@ export function matchAnd(keys, parentProps, childProps) {
// all match
return keys.every(parentKey => {
return childKeys.some(childKey => {
+ if (parentKey !== childKey) {
+ return false;
+ }
const parentValue = parentProps[parentKey];
const childValue = childProps[childKey];
if (childValue === parentValue) {
@@ -22,6 +25,9 @@ export function matchOr(keys, parentProps, childProps) {
// some match
return keys.some(parentKey => {
return childKeys.some(childKey => {
+ if (parentKey !== childKey) {
+ return false;
+ }
const parentValue = parentProps[parentKey];
const childValue = childProps[childKey];
if (childValue === parentValue) {
diff --git a/test/ToggleOrPattern-test.js b/test/ToggleOrPattern-test.js
index a428610..d2b4b23 100644
--- a/test/ToggleOrPattern-test.js
+++ b/test/ToggleOrPattern-test.js
@@ -83,6 +83,26 @@ describe('