From 49edf93691492abc45bc34e559866afb56a4f457 Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Wed, 3 Jan 2024 12:49:05 +0100 Subject: [PATCH] Add console_error_panic_hook --- src/console/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/console/mod.rs b/src/console/mod.rs index eef5380..cb89b3a 100644 --- a/src/console/mod.rs +++ b/src/console/mod.rs @@ -1,3 +1,4 @@ +extern crate console_error_panic_hook; mod types; mod commands; use std::{cell::RefCell, rc::Rc}; @@ -184,6 +185,8 @@ impl Console { #[wasm_bindgen] impl Console { pub fn new() -> Console { + console_error_panic_hook::set_once(); + let root = Rc::new(RefCell::new(Directory::new("".to_string(), "".to_string()))); let console = Console {