We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c426d4 commit 4df4105Copy full SHA for 4df4105
frontend/src/routes/Home.tsx
@@ -208,6 +208,9 @@ export default function Home() {
208
return { data: { job: null } };
209
})
210
.then(({ data }) => {
211
+ if (!data?.job) {
212
+ return;
213
+ }
214
const job: JobMaybe = data!.job;
215
if ((job === null || currentJob === null) && job !== currentJob) {
216
if (currentJob) {
@@ -249,7 +252,7 @@ export default function Home() {
249
252
setOldJobCount(0);
250
253
}
251
254
}),
- GET("/stats").then(({ data }) => setStats(data!)),
255
+ GET("/stats").then(({ data }) => data && setStats(data!)),
256
]).finally(() => {
257
setTimeout(() => setLoadCount(loadCount + 1), 1000);
258
});
0 commit comments