1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-07-22 04:09:37 +00:00

Fix incorrect error code name.

This commit is contained in:
Nolan Darilek 2020-10-08 08:16:01 -05:00
parent 724dd1214f
commit 0c13c43a77

View File

@ -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() {