zoltan-dulac / cssSandpaper

a CSS3 Polyfill that implements CSS3 transforms, box-shadow, gradients, opacity and RGBA/HSL/HSLA colours in browser that don't support them.
http://www.useragentman.com/blog/csssandpaper-a-css3-javascript-library/
208 stars 47 forks source link

Array contains function as well #5

Open makapacs opened 12 years ago

makapacs commented 12 years ago

Hi,

Second issue was when executing function 'fixTextShadows()' the following line:

     for (var i in rules) {

The issue was that an array/list 'rules' contained besides a rule also some function making an IE Script error:

     'selector' is null or not an object

Solution replaced above listed for loop line with the following:

     for (var i = 0; i < rules.length; i++) {

I hope this helps.

Margots