Skip to content
Browse files

Merge branch 'master' into gh-pages

* master:
  Added some sanity checks. Should fix #31
  • Loading branch information...
2 parents 26ea0b7 + 8e509f0 commit feccab54ab93df0954bfc1c71b92fa90916400d0 @fgnass committed Oct 5, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 spin.js
View
6 spin.js
@@ -270,8 +270,12 @@
}), g);
};
proto.opacity = function(el, i, val, o) {
+ var c = el.firstChild;
o = o.shadow && o.lines || 0;
- el.firstChild.childNodes[i+o].firstChild.firstChild.opacity = val;
+ if (c && i+o < c.childNodes.length) {
+ c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild;
+ if (c) c.opacity = val;
+ }
};
}
else {

0 comments on commit feccab5

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