From 40a36aa8e6fcf071d4f802831b206c83a5e4e56b Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Sat, 14 Jan 2023 00:21:26 -0800 Subject: [PATCH] chore: use trim --- packages/core/src/virtual_dom.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/core/src/virtual_dom.rs b/packages/core/src/virtual_dom.rs index b66f53b70..e2c4e528e 100644 --- a/packages/core/src/virtual_dom.rs +++ b/packages/core/src/virtual_dom.rs @@ -385,9 +385,7 @@ impl VirtualDom { }; // Remove the "on" prefix if it exists, TODO, we should remove this and settle on one - if name.starts_with("on") { - name = &name[2..]; - } + name = name.trim_start_matches("on"); // Loop through each dynamic attribute in this template before moving up to the template's parent. while let Some(el_ref) = parent_path {