Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix the assumption that arguments to testProp (etc.) are strings #634

Merged
merged 1 commit into from

2 participants

@dbaron

I realized that my change that you merged earlier today introduced a new assumption that the arguments to testProp (etc.) are strings. It occurs to me that this is an additional (and unnecessary) incompatibility with prior versions of Modernizr, so this fixes it to use contains(), which also matches local style better.

@paulirish paulirish merged commit f6d98dd into from
@paulirish
Owner

Makes sense. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  modernizr.js
View
2  modernizr.js
@@ -325,7 +325,7 @@ window.Modernizr = (function( window, document, undefined ) {
function testProps( props, prefixed ) {
for ( var i in props ) {
var prop = props[i];
- if ( prop.indexOf("-") == -1 && mStyle[prop] !== undefined ) {
+ if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
return prefixed == 'pfx' ? prop : true;
}
}
Something went wrong with that request. Please try again.