Fix Browse page not loading
This commit is contained in:
parent
a2e94baadc
commit
5a3943ae46
@ -21,16 +21,11 @@ export default class BrowseComponent extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleMessage = (event) => {
|
handleMessage = (event) => {
|
||||||
|
//console.log("Got message!");
|
||||||
try {
|
try {
|
||||||
const message = JSON.parse(event.data);
|
const message = JSON.parse(event.data);
|
||||||
const cableList = this.browseParse(message);
|
const cableList = this.browseParse(message);
|
||||||
if (!this.state.isLoading) {
|
this.setState({ cableList });
|
||||||
this.setState({ cableList });
|
|
||||||
} else {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.setState({ cableList });
|
|
||||||
}, 500 - new Date());
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error parsing message from server:", error);
|
console.error("Error parsing message from server:", error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user