Skip to content

Commit d99ee88

Browse files
committed
Fix parsing bug when a media query has no expressions
1 parent 4a6e453 commit d99ee88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function parseQuery(mediaQuery) {
9696
parsed.type = type ? type.toLowerCase() : 'all';
9797

9898
// Split expressions into a list.
99-
expressions = expressions.match(/\([^\)]+\)/g);
99+
expressions = expressions.match(/\([^\)]+\)/g) || [];
100100

101101
parsed.expressions = expressions.map(function (expression) {
102102
var captures = expression.match(RE_MQ_EXPRESSION),

0 commit comments

Comments
 (0)