From 0c897100a0806bf666fabfab96c14c2952813d02 Mon Sep 17 00:00:00 2001 From: Flora Hill Date: Sun, 11 Feb 2024 23:27:51 +0000 Subject: [PATCH] Fix UNDEFINED error preventing rendering --- src/utils.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils.rs b/src/utils.rs index 2a3a33e..e7cafe7 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -54,6 +54,9 @@ impl Chart { let dash = Reflect::get(&segment, &"borderDash".into()); if let Ok(dash) = dash { + if dash == JsValue::UNDEFINED { + return; + } Reflect::set( &segment, &"borderDash".into(), @@ -66,6 +69,9 @@ impl Chart { let color = Reflect::get(&segment, &"borderColor".into()); if let Ok(color) = color { + if color == JsValue::UNDEFINED { + return; + } Reflect::set( &segment, &"borderColor".into(),