Skip to content

Commit

Permalink
replace deprecated method (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodDayForSurf authored Jan 23, 2023
1 parent 7211ee0 commit 5004c24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/media-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const mediumMedia = window.matchMedia('(min-width: 960px) and (max-width: 1279.9
const largeMedia = window.matchMedia('(min-width: 1280px)');

[xSmallMedia, smallMedia, mediumMedia, largeMedia].forEach(media => {
media.addListener((e) => {
media.addEventListener('change', (e) => {
e.matches && handlers.forEach(handler => handler());
});
});
Expand Down

0 comments on commit 5004c24

Please sign in to comment.