Skip to content

Commit 5565af5

Browse files
committed
Fixes
1 parent 180230d commit 5565af5

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
@@ -190,7 +190,7 @@ async function setupApp() {
190190
get_opening_command().then(handleCommand)
191191
checkUpdates()
192192
fetchCredentials()
193-
processPendingSurveys()
193+
await processPendingSurveys()
194194
}
195195
196196
const stateFailed = ref(false)
@@ -400,7 +400,12 @@ async function processPendingSurveys() {
400400
isWithinLastTwoWeeks(instance.last_played) && !isWithinLastTwoWeeks(instance.created),
401401
) >= 0
402402
403-
const surveys = await $fetch('https://api.modrinth.com/v2/surveys')
403+
let surveys = []
404+
try {
405+
surveys = await $fetch('https://api.modrinth.com/v2/surveys')
406+
} catch (e) {
407+
console.error('Error fetching surveys:', e)
408+
}
404409
405410
const surveyToShow = surveys.find(
406411
(survey) =>
@@ -422,7 +427,7 @@ async function processPendingSurveys() {
422427
},
423428
onOpen: () => console.info('Opened user survey'),
424429
onClose: () => console.info('Closed user survey'),
425-
onSubmit: () => console.info('Active user submitted'),
430+
onSubmit: () => console.info('Active user survey submitted'),
426431
}
427432
428433
try {

0 commit comments

Comments
 (0)