File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ async function setupApp() {
190
190
get_opening_command ().then (handleCommand)
191
191
checkUpdates ()
192
192
fetchCredentials ()
193
- processPendingSurveys ()
193
+ await processPendingSurveys ()
194
194
}
195
195
196
196
const stateFailed = ref (false )
@@ -400,7 +400,12 @@ async function processPendingSurveys() {
400
400
isWithinLastTwoWeeks (instance .last_played ) && ! isWithinLastTwoWeeks (instance .created ),
401
401
) >= 0
402
402
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
+ }
404
409
405
410
const surveyToShow = surveys .find (
406
411
(survey ) =>
@@ -422,7 +427,7 @@ async function processPendingSurveys() {
422
427
},
423
428
onOpen : () => console .info (' Opened user survey' ),
424
429
onClose : () => console .info (' Closed user survey' ),
425
- onSubmit : () => console .info (' Active user submitted' ),
430
+ onSubmit : () => console .info (' Active user survey submitted' ),
426
431
}
427
432
428
433
try {
You can’t perform that action at this time.
0 commit comments