Skip to content

Commit 4849a0c

Browse files
committed
🐛 fix more bugs
1 parent 65f28c5 commit 4849a0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/react-automatic-width.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class AutomaticWidth extends React.Component {
2121

2222
componentDidMount() {
2323
let boundListener = this._resizeHandler.bind(this);
24+
boundListener();
2425
window.addEventListener('resize', boundListener);
2526
this.setState({
2627
listener: boundListener
2728
});
28-
this.state.listener();
2929
}
3030

3131
componentWillUnmount() {

0 commit comments

Comments
 (0)