1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 14:28:10 +09:00

fix: non-showing hashtag charts (#1032)

This commit is contained in:
Pavel 2023-01-13 00:19:20 +03:00 committed by GitHub
parent 63adaaf4f9
commit 839331ae67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,11 +19,12 @@ const historyNum = $computed(() => {
})
const sparklineEl = $ref<SVGSVGElement>()
const sparklineFn = typeof sparkline !== 'function' ? (sparkline as any).default : sparkline
watch([$$(historyNum), $$(sparklineEl)], ([historyNum, sparklineEl]) => {
if (!sparklineEl)
return
sparkline(sparklineEl, historyNum)
sparklineFn(sparklineEl, historyNum)
})
</script>