Skip to content

Commit ee49936

Browse files
committed
Update utils.js
1 parent e049fb2 commit ee49936

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,9 @@ if (isEmbed) {
311311

312312
}
313313

314-
window.addEventListener('resize', () => {
315-
316-
isLandscape = window.matchMedia('(orientation: landscape)').matches;
314+
window.matchMedia('(orientation: landscape)').addEventListener('change', (e) => {
315+
316+
isLandscape = e.matches;
317317

318318
});
319319

0 commit comments

Comments
 (0)