fix(settings): don't try to sort timezones if there are none

This commit is contained in:
kolaente 2023-06-18 18:53:01 +02:00
parent 2006abd0a6
commit a92eb31ab3
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 1 deletions

View File

@ -185,7 +185,12 @@ function useAvailableTimezones() {
const HTTP = AuthenticatedHTTPFactory()
HTTP.get('user/timezones')
.then(r => {
availableTimezones.value = r.data.sort()
if (r.data) {
availableTimezones.value = r.data.sort()
return
}
availableTimezones.value = []
})
return availableTimezones