Skip to content

Commit f89f7b8

Browse files
author
Howler Monkey
committed
Fix SOME 500s
1 parent 3f4756b commit f89f7b8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

api/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ const start = async () => {
190190
const page = Number(pageString) || 1;
191191

192192
const { classifiers, ...info } =
193-
shootersTableByMemberNumber[division][memberNumber][0];
193+
shootersTableByMemberNumber[division]?.[memberNumber]?.[0] || {};
194194
const data = multisort(
195195
classifiers,
196196
sort?.split?.(","),

web/src/utils/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const useApi = (endpoint) => {
77
const [json, setJson] = useState(null);
88
useEffect(() => {
99
setJson(null);
10-
if (endpoint) {
10+
if (endpoint && !endpoint.includes("undefined")) {
1111
window
1212
.fetch(API_URL + endpoint)
1313
.then((r) => r.json())

0 commit comments

Comments
 (0)