diff --git a/src/Qt5/imports/FluentUI/Controls/FluChart.qml b/src/Qt5/imports/FluentUI/Controls/FluChart.qml index f47bd20d..457da42e 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluChart.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluChart.qml @@ -15,7 +15,9 @@ Canvas { function animateToNewData() { chartAnimationProgress = 0.1; - d.jsChart?.update(); + if (d.jsChart) { + d.jsChart.update(); + } chartAnimator.restart(); } QtObject{ diff --git a/src/Qt6/imports/FluentUI/Controls/FluChart.qml b/src/Qt6/imports/FluentUI/Controls/FluChart.qml index 30af5ab3..8153c3d8 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluChart.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluChart.qml @@ -14,7 +14,9 @@ Canvas { function animateToNewData() { chartAnimationProgress = 0.1; - d.jsChart?.update(); + if (d.jsChart) { + d.jsChart.update(); + } chartAnimator.restart(); } QtObject{