Skip to content
Browse files

Add check to verify that enableClasses has been initialized.

During custom builds that exclude this functionality enableClasses is never initialized, causing errors to be raised on this line. This patch verifies that enableClasses is initialized before testing the value of enableClasses.
  • Loading branch information...
1 parent ac7b9f5 commit 39fc8faa3eefab70b5c096f9c29629cdb0bbc402 @travisp travisp committed Jul 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 modernizr.js
View
2 modernizr.js
@@ -979,7 +979,7 @@ window.Modernizr = (function( window, document, undefined ) {
test = typeof test == 'function' ? test() : test;
- if (enableClasses) {
+ if (typeof enableClasses !== "undefined" && enableClasses) {
docElement.className += ' ' + (test ? '' : 'no-') + feature;
}
Modernizr[feature] = test;

0 comments on commit 39fc8fa

Please sign in to comment.
Something went wrong with that request. Please try again.