We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09731e1 commit c417249Copy full SHA for c417249
source/AutoSizer/AutoSizer.js
@@ -133,8 +133,7 @@ export default class AutoSizer extends React.PureComponent {
133
const height = this._parentNode.offsetHeight || 0;
134
const width = this._parentNode.offsetWidth || 0;
135
136
- const win = this._parentNode.ownerDocument.defaultView;
137
- const style = win.getComputedStyle(this._parentNode) || {};
+ const style = window.getComputedStyle(this._parentNode) || {};
138
const paddingLeft = parseInt(style.paddingLeft, 10) || 0;
139
const paddingRight = parseInt(style.paddingRight, 10) || 0;
140
const paddingTop = parseInt(style.paddingTop, 10) || 0;
0 commit comments