Fix Browse page not loading

This commit is contained in:
Cole Deck 2024-07-29 12:03:39 -05:00
parent a2e94baadc
commit 5a3943ae46

View File

@ -21,16 +21,11 @@ export default class BrowseComponent extends Component {
}
handleMessage = (event) => {
//console.log("Got message!");
try {
const message = JSON.parse(event.data);
const cableList = this.browseParse(message);
if (!this.state.isLoading) {
this.setState({ cableList });
} else {
setTimeout(() => {
this.setState({ cableList });
}, 500 - new Date());
}
this.setState({ cableList });
} catch (error) {
console.error("Error parsing message from server:", error);
}