Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 39fc8faa3eefab70b5c096f9c29629cdb0bbc402 1 parent ac7b9f5
@travisp travisp authored
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;
Please sign in to comment.
Something went wrong with that request. Please try again.