From 500368958fe1da0e8ed3f4fa2066c2fb54697bad Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 17 Aug 2022 23:00:53 +0100 Subject: [PATCH] Ensure errors are caught when defining JavaScript classes --- lib/src/fnc/script/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/fnc/script/main.rs b/lib/src/fnc/script/main.rs index 9bfbd98a..adaf5928 100644 --- a/lib/src/fnc/script/main.rs +++ b/lib/src/fnc/script/main.rs @@ -40,11 +40,11 @@ pub async fn run( // Register the fetch function as a global object global.init_def::()?; // Register the Duration type as a global class - global.init_def::().unwrap(); + global.init_def::()?; // Register the Record type as a global class - global.init_def::().unwrap(); + global.init_def::()?; // Register the Uuid type as a global class - global.init_def::().unwrap(); + global.init_def::()?; // Attempt to compile the script let res = ctx.compile("script", src)?; // Attempt to fetch the main export