Skip to content

Commit

Permalink
Prevent JavaScript errors if an app loads without any CSS, fixes zurb…
Browse files Browse the repository at this point in the history
  • Loading branch information
gakimball committed May 6, 2015
1 parent bc01826 commit a685ccc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/angular/services/foundation.mediaquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
helpers.headerHelper(['foundation-mq']);
extractedMedia = helpers.getStyle('.foundation-mq', 'font-family');

if (!extractedMedia.match(/([\w]+=[\d]+[a-z]*&?)+/)) {
extractedMedia = 'small=0&medium=40rem&large=75rem&xlarge=90rem&xxlarge=120rem';
}

mediaQueries = helpers.parseStyleToObject((extractedMedia));

for(var key in mediaQueries) {
Expand Down

0 comments on commit a685ccc

Please sign in to comment.