mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 18:59:59 +01:00
Fix: Update stateWord logic in Activity component for better handling of state strings
- Modified the logic for determining stateWord to ensure it correctly handles cases where the state string has fewer than two words, defaulting to 'secret' when necessary.
This commit is contained in:
@@ -50,7 +50,7 @@ const getActivity = computed(() => {
|
||||
.replace('Workspace:', '')
|
||||
.trim()
|
||||
: ''
|
||||
const stateWord = state.split(' ')[1] || t('secret')
|
||||
const stateWord = state.split(' ').length >= 2 ? state.split(' ')[1] : t('secret')
|
||||
const ago = useTimeAgo(timestamps.start, {
|
||||
messages: activityMessages[locale.value] as UseTimeAgoMessages,
|
||||
}).value
|
||||
|
||||
Reference in New Issue
Block a user