From f015fbe32c3788cb453ae9d7b3d88ab7052dfadc Mon Sep 17 00:00:00 2001 From: Nasr Date: Tue, 5 Nov 2024 14:42:01 -0500 Subject: [PATCH] fmt --- src/wasm/utils.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wasm/utils.rs b/src/wasm/utils.rs index 4a8d143..51b6170 100644 --- a/src/wasm/utils.rs +++ b/src/wasm/utils.rs @@ -26,15 +26,16 @@ pub fn parse_ty_as_json_str(ty: &dojo_types::schema::Ty, key: bool) -> Ty { (child.name.to_owned(), parse_ty_as_json_str(&child.ty, child.key)) }) .collect::>(); - + // Convert to JsValue as an object instead of a Map let js_obj = js_sys::Object::new(); for (key, value) in map { js_sys::Reflect::set( &js_obj, &JsValue::from_str(&key), - &serde_wasm_bindgen::to_value(&value).unwrap() - ).unwrap(); + &serde_wasm_bindgen::to_value(&value).unwrap(), + ) + .unwrap(); } JsValue::from(js_obj) },