Permalink
Browse files

Fix for issue 149

currentStyle is Async in IE, and/or may be null if an element is created using createElement.  Either way, PIE needs to make sure currentStyle is present before accessing its methods.

(see http://stackoverflow.com/questions/3722736/weird-ie-behavior-currentstyle-returns-null)
  • Loading branch information...
1 parent 34154b1 commit 91e91177cff7947ff6533907c34e5b9d1b85161f @gruber76 committed Mar 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 sources/StyleInfoBase.js
View
2 sources/StyleInfoBase.js
@@ -51,7 +51,7 @@ PIE.StyleInfoBase = {
var el = this.targetElement,
ctor = this.constructor,
s = el.style,
- cs = el.currentStyle,
+ cs = el.currentStyle || {getAttribute:{}},
cssProp = this.cssProperty,
styleProp = this.styleProperty,
prefixedCssProp = ctor._prefixedCssProp || ( ctor._prefixedCssProp = PIE.CSS_PREFIX + cssProp ),

0 comments on commit 91e9117

Please sign in to comment.