Fix incorrect error code name.

This commit is contained in:
Nolan Darilek 2020-10-08 08:16:01 -05:00
parent 724dd1214f
commit 0c13c43a77
1 changed files with 1 additions and 1 deletions

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