Skip to content

Commit be724be

Browse files
committed
fix: revert statusText logic
1 parent 97eb03f commit be724be

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/error.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const props = defineProps<{
77
88
const status = computed(() => props.error.status || 500)
99
const statusText = computed(() => {
10+
if (props.error.statusText) return props.error.statusText
1011
switch (status.value) {
1112
case 401:
1213
return $t('error.401')
@@ -16,10 +17,9 @@ const statusText = computed(() => {
1617
return $t('error.500')
1718
case 503:
1819
return $t('error.503')
20+
default:
21+
return $t('error.default')
1922
}
20-
21-
if (props.error.statusText) return props.error.statusText
22-
return $t('error.default')
2323
})
2424
2525
function handleError() {

0 commit comments

Comments
 (0)