Skip to content

Commit 7ece0ec

Browse files
committed
Remove ill-advised error handling
1 parent 353005d commit 7ece0ec

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

components/Meetup.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@ export default class Meetup extends React.Component {
2121
})
2222
window
2323
.fetch(NEXT_MEETUP_URI)
24-
.then(res => {
25-
// Gotta love network errors...
26-
if (!res.ok) throw Error(response.statusText)
27-
return response
28-
})
2924
.then(res => res.json())
3025
.then(json =>
3126
this.setState({
3227
...json,
33-
loading: false
28+
loading: false,
29+
error: false
3430
})
3531
)
3632
.catch(_ => this.setState({ loading: false, error: true }))

0 commit comments

Comments
 (0)