Return when required element is not present
This commit is contained in:
parent
58bb07d11d
commit
1bc2749e1b
@ -365,7 +365,11 @@ fn init_editor() -> Result<(), EditorError> {
|
|||||||
.set_property("display", "block")
|
.set_property("display", "block")
|
||||||
.map_err(|_| EditorError::DOMError)?;
|
.map_err(|_| EditorError::DOMError)?;
|
||||||
// And hide the HTML-only fallback
|
// And hide the HTML-only fallback
|
||||||
let old_ed = document().get_element_by_id("plume-fallback-editor")?;
|
let old_ed = document().get_element_by_id("plume-fallback-editor");
|
||||||
|
if old_ed.is_none() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
let old_ed = old_ed.unwrap();
|
||||||
let old_title = document().get_element_by_id("plume-editor-title")?;
|
let old_title = document().get_element_by_id("plume-editor-title")?;
|
||||||
old_ed
|
old_ed
|
||||||
.dyn_ref::<HtmlElement>()
|
.dyn_ref::<HtmlElement>()
|
||||||
|
Loading…
Reference in New Issue
Block a user