mirror of
https://github.com/yewprint/yewprint
synced 2024-11-21 19:13:05 +00:00
Fix Light/Dark theme switch (#165)
This commit is contained in:
parent
fa96d3e403
commit
5d0bddca6b
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ impl Component for App {
|
|||
fn update(&mut self, ctx: &Context<Self>, msg: Self::Message) -> bool {
|
||||
match msg {
|
||||
Msg::ToggleLight => {
|
||||
DARK.with(|x| x.replace(!*x.borrow()));
|
||||
DARK.with(|x| x.replace_with(|&mut x| !x));
|
||||
}
|
||||
Msg::GoToMenu(event, doc_menu) => {
|
||||
event.prevent_default();
|
||||
|
|
Loading…
Reference in a new issue