your personal website on atproto - mirror blento.app

statusphere fix

Florian 366ab2a4 771e2db3

+3 -2
+1 -1
src/lib/cards/StatusphereCard/StatusphereCard.svelte
··· 11 11 // svelte-ignore state_referenced_locally 12 12 let record = $state(data[item.cardType] as any); 13 13 14 - let animated = $derived(emojiToNotoAnimatedWebp(record.value.status)); 14 + let animated = $derived(emojiToNotoAnimatedWebp(record?.value?.status)); 15 15 </script> 16 16 17 17 <div class="flex h-full w-full items-center justify-center p-4">
+2 -1
src/lib/cards/StatusphereCard/index.ts
··· 43 43 } 44 44 } as CardDefinition & { type: 'statusphere' }; 45 45 46 - export function emojiToNotoAnimatedWebp(emoji: string): string | undefined { 46 + export function emojiToNotoAnimatedWebp(emoji: string | undefined): string | undefined { 47 + if (!emoji) return; 47 48 // Convert emoji to lowercase hex codepoints joined by "-" 48 49 const codepoints: string[] = []; 49 50 for (const char of emoji) {