From 7ffa35eb13bce3d3699de6a51d36e8bed28b2d08 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Sun, 6 Apr 2025 23:04:54 +0200 Subject: [PATCH] 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. --- app/components/home/Activity.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/home/Activity.vue b/app/components/home/Activity.vue index 1b68580..0144dc7 100644 --- a/app/components/home/Activity.vue +++ b/app/components/home/Activity.vue @@ -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