Skip to content

Commit 63e20e3

Browse files
committed
add support for not operator
1 parent 50e6932 commit 63e20e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ function doesMQMatch(mq, query) {
173173
didMQMatch = false;
174174
}
175175

176+
//If there was a `not` in front of the media query, we need to invert the match.
177+
didMQMatch = (p.not) ? !didMQMatch : didMQMatch;
178+
176179
//For each parsed mq, add a `true` or a `false` to the matches array.
177180
matches.push(didMQMatch);
178181
});

0 commit comments

Comments
 (0)