Skip to content

Commit

Permalink
fix console error spam on motd
Browse files Browse the repository at this point in the history
  • Loading branch information
beebls committed Dec 16, 2023
1 parent 36d7fb6 commit c34cc2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ export async function genericGET(
throw new Error(`No json returned!`);
})
.catch((err) => {
console.error(`Error fetching ${fetchPath}`, err);
if (!failSilently) {
console.error(`Error fetching ${fetchPath}`, err);
}
onError();
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/QAMTab/MOTDDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function MOTDDisplay() {
const { hiddenMotd, setGlobalState } = useCssLoaderState();
useEffect(() => {
async function getMotd() {
const res = await genericGET("/motd", false);
const res = await genericGET("/motd", false, undefined, () => {}, true);
setMotd(res);
}
getMotd();
Expand Down

0 comments on commit c34cc2c

Please sign in to comment.