diff --git a/src/components/queue/QueueNotificationBanner.stories.ts b/src/components/queue/QueueNotificationBanner.stories.ts index a8b553deb5..7d0dab9d3a 100644 --- a/src/components/queue/QueueNotificationBanner.stories.ts +++ b/src/components/queue/QueueNotificationBanner.stories.ts @@ -52,7 +52,7 @@ export const Completed: Story = { args: args({ type: 'completed', count: 1, - thumbnailUrl: thumbnail('4dabf7') + thumbnailUrls: [thumbnail('4dabf7')] }) } @@ -97,7 +97,7 @@ export const Gallery: Story = { const completed = args({ type: 'completed', count: 1, - thumbnailUrl: thumbnail('ff6b6b') + thumbnailUrls: [thumbnail('ff6b6b')] }) const completedMultiple = args({ type: 'completed', diff --git a/src/components/queue/QueueNotificationBanner.vue b/src/components/queue/QueueNotificationBanner.vue index d2b71a677a..5031808ea9 100644 --- a/src/components/queue/QueueNotificationBanner.vue +++ b/src/components/queue/QueueNotificationBanner.vue @@ -71,11 +71,6 @@ const thumbnailUrls = computed(() => { if (notification.type !== 'completed') { return [] } - if (typeof notification.thumbnailUrl === 'string') { - return notification.thumbnailUrl.length > 0 - ? [notification.thumbnailUrl] - : [] - } return notification.thumbnailUrls?.slice(0, 2) ?? [] }) diff --git a/src/composables/queue/useQueueNotificationBanners.ts b/src/composables/queue/useQueueNotificationBanners.ts index b94aac24da..0858c2b4e8 100644 --- a/src/composables/queue/useQueueNotificationBanners.ts +++ b/src/composables/queue/useQueueNotificationBanners.ts @@ -23,7 +23,6 @@ type QueueQueuedNotification = { type QueueCompletedNotification = { type: 'completed' count: number - thumbnailUrl?: string thumbnailUrls?: string[] } @@ -38,7 +37,7 @@ export type QueueNotificationBanner = | QueueFailedNotification const sanitizeCount = (value: number | undefined) => { - if (value === undefined || Number.isNaN(value) || value <= 0) { + if (!(typeof value === 'number' && value > 0)) { return 1 } return Math.floor(value)