From 2bdad42ad060e5678df22e5df3d90d598c2586c5 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Wed, 25 Nov 2026 22:31:02 +0100 Subject: [PATCH] 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 * refactor: reuse clone() from $lib/utils for chart options Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- frontend/src/lib/components/chartjs-wrappers/Chart.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/chartjs-wrappers/Chart.svelte b/frontend/src/lib/components/chartjs-wrappers/Chart.svelte index 66739a7859..fa59ca73c4 100644 --- a/frontend/src/lib/components/chartjs-wrappers/Chart.svelte +++ b/frontend/src/lib/components/chartjs-wrappers/Chart.svelte @@ -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 () => {