mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-22 23:49:38 +00:00
Fix incorrect error code name.
This commit is contained in:
parent
724dd1214f
commit
0c13c43a77
|
@ -89,7 +89,7 @@ impl Backend for Web {
|
|||
}) as Box<dyn Fn(_)>);
|
||||
utterance.set_onend(Some(callback.as_ref().unchecked_ref()));
|
||||
let callback = Closure::wrap(Box::new(move |evt: SpeechSynthesisErrorEvent| {
|
||||
if evt.error() == SpeechSynthesisErrorCode::Cancel {
|
||||
if evt.error() == SpeechSynthesisErrorCode::Canceled {
|
||||
let mut callbacks = CALLBACKS.lock().unwrap();
|
||||
let callback = callbacks.get_mut(&id).unwrap();
|
||||
if let Some(f) = callback.utterance_stop.as_mut() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user