Skip to content

Commit

Permalink
#921@trivial: Continues on implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
capricorn86 committed May 16, 2023
1 parent a0c560e commit 6c80625
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/happy-dom/src/match-media/MediaQueryParser.ts
Expand Up @@ -53,7 +53,10 @@ export default class MediaQueryParser {
} else if (match[1] === 'not') {
currentMediaQueryItem.not = true;
} else if (match[2]) {
const resolutionMatch = match[2].match(RESOLUTION_REGEXP);
const resolutionMatch =
match[2].includes('<') || match[2].includes('>')
? match[2].match(RESOLUTION_REGEXP)
: null;
if (resolutionMatch && (resolutionMatch[1] || resolutionMatch[6])) {
if (resolutionMatch[1] && resolutionMatch[2] && resolutionMatch[3]) {
const value = parseInt(resolutionMatch[1], 10);
Expand Down

0 comments on commit 6c80625

Please sign in to comment.