Skip to content

Commit c259c3b

Browse files
committed
Fixes
1 parent b3a4df9 commit c259c3b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

apps/app-frontend/src/App.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ async function setupApp() {
199199
get_opening_command().then(handleCommand)
200200
checkUpdates()
201201
fetchCredentials()
202-
processPendingSurveys()
202+
await processPendingSurveys()
203203
}
204204
205205
const stateFailed = ref(false)
@@ -409,7 +409,12 @@ async function processPendingSurveys() {
409409
isWithinLastTwoWeeks(instance.last_played) && !isWithinLastTwoWeeks(instance.created),
410410
) >= 0
411411
412-
const surveys = await $fetch('https://api.modrinth.com/v2/surveys')
412+
let surveys = []
413+
try {
414+
surveys = await $fetch('https://api.modrinth.com/v2/surveys')
415+
} catch (e) {
416+
console.error('Error fetching surveys:', e)
417+
}
413418
414419
const surveyToShow = surveys.find(
415420
(survey) =>
@@ -431,7 +436,7 @@ async function processPendingSurveys() {
431436
},
432437
onOpen: () => console.info('Opened user survey'),
433438
onClose: () => console.info('Closed user survey'),
434-
onSubmit: () => console.info('Active user submitted'),
439+
onSubmit: () => console.info('Active user survey submitted'),
435440
}
436441
437442
try {

0 commit comments

Comments
 (0)