Share Posted May 14 Hi there, Cannot read properties of undefined (reading 'DOM') I got this error while working on my project, i couldn't find a solution for that. What i am missing here? See the Pen NWybXmy by tw_parodia (@tw_parodia) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted May 14 I've created an arrow function of your matchMedia query and that seems to work.`this.` will otherwise be scoped to its parent function "(min-width: 800px)": function() { "(min-width: 800px)":() => { See the Pen MWQbQXg?editors=0011 by mvaneijgen (@mvaneijgen) on CodePen 2 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now