fix: non-showing hashtag charts (#1032)
This commit is contained in:
parent
63adaaf4f9
commit
839331ae67
|
@ -19,11 +19,12 @@ const historyNum = $computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const sparklineEl = $ref<SVGSVGElement>()
|
const sparklineEl = $ref<SVGSVGElement>()
|
||||||
|
const sparklineFn = typeof sparkline !== 'function' ? (sparkline as any).default : sparkline
|
||||||
|
|
||||||
watch([$$(historyNum), $$(sparklineEl)], ([historyNum, sparklineEl]) => {
|
watch([$$(historyNum), $$(sparklineEl)], ([historyNum, sparklineEl]) => {
|
||||||
if (!sparklineEl)
|
if (!sparklineEl)
|
||||||
return
|
return
|
||||||
sparkline(sparklineEl, historyNum)
|
sparklineFn(sparklineEl, historyNum)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue