Skip to content
This repository was archived by the owner on Aug 13, 2018. It is now read-only.

Commit c7eb869

Browse files
committed
Remove unnecessary if-test
1 parent 0142712 commit c7eb869

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

data/components/connection-filter.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ var ConnectionFilter = React.createClass({
4848
// with some API call listing only the current connections on
4949
// the page.
5050
componentWillReceiveProps({ frames }) {
51-
if (frames && Array.isArray(frames.frames)) {
52-
frames.frames.forEach(frame => {
53-
const { uniqueConnections } = this.state;
54-
if (!uniqueConnections.includes(frame.webSocketSerialID)) {
55-
this.setState({
56-
uniqueConnections: [...uniqueConnections, frame.webSocketSerialID]
57-
});
58-
}
59-
})
60-
}
51+
frames.frames.forEach(frame => {
52+
const { uniqueConnections } = this.state;
53+
54+
if (!uniqueConnections.includes(frame.webSocketSerialID)) {
55+
this.setState({
56+
uniqueConnections: [...uniqueConnections, frame.webSocketSerialID]
57+
});
58+
}
59+
})
6160
},
6261

6362
render() {

0 commit comments

Comments
 (0)