Skip to content

Commit ec43175

Browse files
authored
Computed Styles fix for FireFox
shapeshifta78@bb4a3b4
1 parent 11f057c commit ec43175

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ResizeSensor.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@
102102
return element.currentStyle[prop];
103103
}
104104
if (window.getComputedStyle) {
105-
return window.getComputedStyle(element, null).getPropertyValue(prop);
105+
var computedElementStyle = window.getComputedStyle(element, null);
106+
if (computedElementStyle) {
107+
return computedElementStyle.getPropertyValue(prop);
108+
}
106109
}
107110

108111
return element.style[prop];

0 commit comments

Comments
 (0)