We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 652014c commit e1aaaa7Copy full SHA for e1aaaa7
app/components/BlueskyComment.vue
@@ -39,8 +39,9 @@ function getHostname(uri: string): string {
39
}
40
41
42
+let segmenter: Intl.Segmenter | null = null
43
function firstChar(str: string): string {
- const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' })
44
+ segmenter ??= new Intl.Segmenter(undefined, { granularity: 'grapheme' })
45
return Array.from(segmenter.segment(str))[0]?.segment ?? ''
46
47
</script>
0 commit comments