Permalink
Browse files

Merge pull request #90 from jwestbrook/IE8Opacityfix

Prevent exception in IE when calling `Element.getOpacity`.
  • Loading branch information...
2 parents 4b9fe6f + 30b11b7 commit 4ce0b0fa5fe656cff28fed135181eb3f3f5bbf29 @savetheclocktower savetheclocktower committed Dec 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/prototype/dom/dom.js
@@ -3000,7 +3000,7 @@
var filter = Element.getStyle(element, 'filter');
if (filter.length === 0) return 1.0;
var match = (filter || '').match(/alpha\(opacity=(.*)\)/);
- if (match[1]) return parseFloat(match[1]) / 100;
+ if (match && match[1]) return parseFloat(match[1]) / 100;
return 1.0;
}
@@ -3478,4 +3478,4 @@
if (window.attachEvent)
window.attachEvent('onunload', destroyCache_IE);
-})(this);
+})(this);

0 comments on commit 4ce0b0f

Please sign in to comment.