mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-28 08:06:16 +00:00
fix: stop state_snapshot_uncloneable warnings from chart options (#12653)
* fix: stop state_snapshot_uncloneable warnings from chart options Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: reuse clone() from $lib/utils for chart options Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8e3f11705f
commit
2bdad42ad0
@@ -8,6 +8,7 @@
|
||||
import 'chart.js/auto'
|
||||
import 'chartjs-adapter-date-fns'
|
||||
import { untrack } from 'svelte'
|
||||
import { clone } from '$lib/utils'
|
||||
|
||||
interface Props extends HTMLCanvasAttributes {
|
||||
type: T
|
||||
@@ -28,7 +29,7 @@
|
||||
chart = new Chart(canvasElem, {
|
||||
type,
|
||||
data: $state.snapshot(data) as typeof data,
|
||||
options: $state.snapshot(options) as typeof options
|
||||
options: clone(options)
|
||||
})
|
||||
})
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user