Skip to content

Commit 812ffb0

Browse files
committed
listener now fired only on state change
1 parent 6b26010 commit 812ffb0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

matchMedia.addListener.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
window.matchMedia = function( q ){
88
var ret = oldMM( q ),
99
listeners = [],
10-
last = false,
10+
last = ret.matches,
1111
timer,
1212
check = function(){
1313
var list = oldMM( q ),

0 commit comments

Comments
 (0)