]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix polyfill for matchMedia
authorKevin Ball <kmball11@gmail.com>
Mon, 26 Jun 2017 18:29:27 +0000 (11:29 -0700)
committerKevin Ball <kmball11@gmail.com>
Mon, 26 Jun 2017 18:29:27 +0000 (11:29 -0700)
js/foundation.util.mediaQuery.js

index 23e1eb74b8abbd86f4d33e99a0ada386b251ae66..fc3c178e1da07f738a0f5b0587df342f9a3e178e 100644 (file)
@@ -18,7 +18,7 @@ const defaultQueries = {
 
 // matchMedia() polyfill - Test a CSS media type/query in JS.
 // Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license
-let matchMedia = window.matchMedia || function() {
+let matchMedia = (window.matchMedia || function() {
   'use strict';
 
   // For browsers that support matchMedium api such as IE 9 and webkit
@@ -61,7 +61,7 @@ let matchMedia = window.matchMedia || function() {
       media: media || 'all'
     };
   }
-}
+})();
 
 var MediaQuery = {
   queries: [],