question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

matchMedia polyfill stopped working with latest release

See original GitHub issue

Hi, we have saw this new error started today:

/local/workspace/minted_ui-test/node_modules/enquire.js/dist/enquire.js:116
    if(!matchMedia) {
        ^

ReferenceError: matchMedia is not defined

The polyfill for matchMedia does not work any more. https://github.com/WickyNilliams/enquire.js/issues/82

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:23
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
WickyNilliamscommented, Mar 14, 2017

Should be fixed in v2.1.6. Thanks to @Edward67 for the PR!

1reaction
wwsuncommented, Mar 13, 2017

Using enquire.js@2.1.1 @WickyNilliams

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest testing with react: matchMedia not present, legacy ...
Any suggestions to fix? matchMedia not present, legacy browsers require a polyfill at new MediaQueryDispatch (node_modules/enquire.js/src/ ...
Read more >
matchmedia-polyfill - npm
Latest version: 0.3.2, last published: 4 years ago. Start using matchmedia-polyfill in your project by running `npm i matchmedia-polyfill`.
Read more >
Update the window.matchMedia polyfill to include the listener ...
window.matchMedia and the MediaQueryList object that it returns have a specific interface. ... The polyfill included in the respond.min.js file in ...
Read more >
Chapter 1. The Problem with Native JavaScript APIs - O'Reilly
Paul Irish attempted to create a polyfill for matchMedia() , defining his own function with that name if one didn’t already exist. There...
Read more >
Error in IE11 for matchMedia - javascript - Stack Overflow
In IE9 'window.matchMedia' is undefined, so that you have to add supported mediaListeners to your document. matchMedia polyfill will works for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found