Update FluChart.qml

In some cases, not sure why but animateToNewData is called and jsChart is undefined so it generate an error. Adding a "?" operator avoid the issue if jsChart is not ready, no error and can be called later.
This commit is contained in:
Gaëtan Dezeiraud 2024-11-16 19:51:52 +01:00
parent d82e0ed529
commit 8f5fbb4053
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ Canvas {
function animateToNewData()
{
chartAnimationProgress = 0.1;
d.jsChart.update();
d.jsChart?.update();
chartAnimator.restart();
}
QtObject{

View File

@ -14,7 +14,7 @@ Canvas {
function animateToNewData()
{
chartAnimationProgress = 0.1;
d.jsChart.update();
d.jsChart?.update();
chartAnimator.restart();
}
QtObject{