From 9077404cf07c1034185514d8e9eeb87fbf98dc94 Mon Sep 17 00:00:00 2001 From: Filipe Rodrigues Date: Mon, 19 Feb 2024 04:07:19 +0000 Subject: [PATCH] Fixed effects map being called an array in some places. --- dynatos/src/object_attach_effect.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dynatos/src/object_attach_effect.rs b/dynatos/src/object_attach_effect.rs index 278b37c..3b660ec 100644 --- a/dynatos/src/object_attach_effect.rs +++ b/dynatos/src/object_attach_effect.rs @@ -16,13 +16,13 @@ where { /// Attaches an effect to this object fn attach_effect(&self, effect: Effect) { - // Get the effects array, or create it, if it doesn't exist + // Get the effects map, or create it, if it doesn't exist // TODO: Use an static anonymous symbol? let prop_name: &str = "__dynatos_effects"; let obj = self.as_ref(); let effects = match obj.get::(prop_name) { Ok(effects) => effects, - Err(dynatos_util::GetError::WrongType(err)) => panic!("Effects array was the wrong type: {err:?}"), + Err(dynatos_util::GetError::WrongType(err)) => panic!("Effects map was the wrong type: {err:?}"), Err(dynatos_util::GetError::Missing) => { let effects = js_sys::Map::new(); obj.set_prop(prop_name, &effects);