We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd02a96 commit ebfe4e1Copy full SHA for ebfe4e1
src/ResizeSensor.js
@@ -41,8 +41,13 @@
41
function getComputedStyle(element, prop) {
42
if (element.currentStyle) {
43
return element.currentStyle[prop];
44
- } else if (window.getComputedStyle) {
45
- return window.getComputedStyle(element, null).getPropertyValue(prop);
+ } else if (window.getComputedStyle != null) {
+ var tmpStyle = window.getComputedStyle(element, null);
46
+ if (tmpStyle != null) {
47
+ return tmpStyle.getPropertyValue(prop);
48
+ } else {
49
+ return element.style[prop];
50
+ }
51
} else {
52
return element.style[prop];
53
}
@@ -155,4 +160,4 @@
155
160
156
161
};
157
162
158
-})();
163
+})();
0 commit comments