mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 18:40:34 +00:00
Merge pull request 'Use result of local storage insert operation to suppress Clippy' (#810) from KitaitiMakoto/Plume:suppress-clippy into main
Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/810 Reviewed-by: kiwii <kiwii@noreply@joinplu.me>
This commit is contained in:
commit
9aaff1a484
1 changed files with 7 additions and 1 deletions
|
@ -269,7 +269,13 @@ pub fn init() -> Result<(), EditorError> {
|
|||
let editor_button = document().create_element("a")?;
|
||||
js! { @{&editor_button}.href = "#"; }
|
||||
editor_button.add_event_listener(|_: ClickEvent| {
|
||||
window().local_storage().insert("basic-editor", "false");
|
||||
if window()
|
||||
.local_storage()
|
||||
.insert("basic-editor", "false")
|
||||
.is_err()
|
||||
{
|
||||
console!(log, "Failed to write into local storage");
|
||||
}
|
||||
window().history().go(0).ok(); // refresh
|
||||
});
|
||||
editor_button.append_child(
|
||||
|
|
Loading…
Reference in a new issue