Add console_error_panic_hook
This commit is contained in:
parent
798582ae7d
commit
49edf93691
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user