Skip to content

Commit

Permalink
fix inifinite loading bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkIntaqt committed Aug 12, 2023
1 parent 1e438c9 commit 729a658
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/module/user/UserHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import css from "../../css/stats.module.css"
import { Component } from "react";
import Loader from "../Loader";
import get from "../../func/get";
import { getCache } from "../../func/getCheckCache";
import Match from "./Match";
import { getStorage, setStorage, storageKeys } from "../../func/localStorageFunctions";

Expand Down Expand Up @@ -99,7 +98,7 @@ export default class History extends Component {
}

if (this.state.matches.length === 0) {
get("https://challenges.darkintaqt.com/api/v1/history/?id=" + user.id, this.addHistory)
get("https://challenges.darkintaqt.com/api/v1/history/?id=" + user.id, this.addHistory, () => { this.setState({ error: "Failed to load match history." }) })
}
}

Expand Down

0 comments on commit 729a658

Please sign in to comment.