Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eee3b34

Browse files
Update useWidth.jsx
1 parent fcbc4bb commit eee3b34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/components/patterns/Hooks/exercise_custom/useWidth.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class WithWidth extends React.Component {
1414
}
1515

1616
componentDidMount() {
17-
if (window){
17+
if (typeofwindow!=="undefined"){
1818
window.addEventListener("resize", this.handleResize);
1919
this.handleResize();
2020
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /