From b1fecc33365bd0ce792305372776be7c41f4c95d Mon Sep 17 00:00:00 2001 From: tascord <35181375+tascord@users.noreply.github.com> Date: Mon, 12 Feb 2024 09:54:40 +1100 Subject: [PATCH 1/2] Correct spelling mistake Apologies --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b8ea36b..14bf09e 100644 --- a/README.md +++ b/README.md @@ -96,11 +96,11 @@ It is important then, that you know which variables are being parsed to the func segment: Segment { borderColor: FnWithArgs::new() // Create the Function - .arg("ctx") // Add a named arguement using a builder pattern + .arg("ctx") // Add a named argument using a builder pattern .body("ctx.p0.parsed.y > ctx.p1.parsed.y ? 'red' : 'green'") // Add the function body, in this case make the line red if the slope is negative } } ] } } -``` \ No newline at end of file +``` From 0c897100a0806bf666fabfab96c14c2952813d02 Mon Sep 17 00:00:00 2001 From: Flora Hill Date: Sun, 11 Feb 2024 23:27:51 +0000 Subject: [PATCH 2/2] 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(),