From 88f65a20f0ae8e7d03b40f1fc51f03c3371b3638 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Fri, 3 Jan 2025 14:40:26 +0000 Subject: [PATCH] Make sure that there're no silent failures --- backend/sync_lib/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/sync_lib/src/lib.rs b/backend/sync_lib/src/lib.rs index eb5e9bd..6719300 100644 --- a/backend/sync_lib/src/lib.rs +++ b/backend/sync_lib/src/lib.rs @@ -51,6 +51,7 @@ pub fn merge_text(parent: &str, left: &str, right: &str) -> String { #[wasm_bindgen(js_name = isBinary)] pub fn is_binary(data: &[u8]) -> bool { data.iter().any(|&b| b == 0) } +#[cfg(feature = "console_error_panic_hook")] #[wasm_bindgen(js_name = setPanicHook)] pub fn set_panic_hook() { // When the `console_error_panic_hook` feature is enabled, we can call the @@ -59,6 +60,5 @@ pub fn set_panic_hook() { // // For more details see // https://github.com/rustwasm/console_error_panic_hook#readme - #[cfg(feature = "console_error_panic_hook")] console_error_panic_hook::set_once(); }