Skip to content

Commit

Permalink
fix(wasm): opencc should be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowee committed Mar 22, 2024
1 parent 9f1761b commit ae9c1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ pub fn get_mediawiki_commit() -> String {
env!("MEDIAWIKI_COMMIT_HASH").into()
}
#[wasm_bindgen]
pub fn get_opencc_commit() -> String {
env!("OPENCC_COMMIT_HASH").into()
pub fn get_opencc_commit() -> Option<String> {
option_env!("OPENCC_COMMIT_HASH").map(|s| s.into())
}

/// Convert a text to a target Chinese variant.
Expand Down

0 comments on commit ae9c1d4

Please sign in to comment.