mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-22 11:31:01 +00:00
Return when required element is not present
This commit is contained in:
parent
58bb07d11d
commit
1bc2749e1b
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue