From b117880fed3085b89e02433328c14f56aeda8d79 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Fri, 4 Oct 2024 09:55:49 +0800 Subject: [PATCH] fix: type err --- crates/loro-internal/src/state.rs | 1 + crates/loro-wasm/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/loro-internal/src/state.rs b/crates/loro-internal/src/state.rs index 4efe3203..bb6ce807 100644 --- a/crates/loro-internal/src/state.rs +++ b/crates/loro-internal/src/state.rs @@ -350,6 +350,7 @@ impl State { State::RichtextState(richtext_state.fork(config)) } State::TreeState(tree_state) => State::TreeState(tree_state.fork(config)), + #[cfg(feature = "counter")] State::CounterState(counter_state) => State::CounterState(counter_state.fork(config)), State::UnknownState(unknown_state) => State::UnknownState(unknown_state.fork(config)), } diff --git a/crates/loro-wasm/Cargo.toml b/crates/loro-wasm/Cargo.toml index 773ec27b..e0cb2b93 100644 --- a/crates/loro-wasm/Cargo.toml +++ b/crates/loro-wasm/Cargo.toml @@ -14,7 +14,7 @@ loro-internal = { path = "../loro-internal", features = ["wasm", "counter"] } wasm-bindgen = "=0.2.92" serde-wasm-bindgen = { version = "^0.6.5" } wasm-bindgen-derive = "0.2.1" -console_error_panic_hook = { version = "0.1.6", optional = true } +console_error_panic_hook = { version = "0.1.6" } getrandom = { version = "0.2.15", features = ["js"] } serde = { workspace = true } rle = { path = "../rle", package = "loro-rle" } @@ -23,4 +23,4 @@ tracing = { version = "0.1", features = ["release_max_level_warn"] } serde_json = "1" [features] -default = ["console_error_panic_hook"] +default = []