Skip to content

Commit

Permalink
fix: regressions introduced by #505
Browse files Browse the repository at this point in the history
- Crash on startup if modules missing common options
- Crash on startup due to disable_popup incorrectly mandatory
  • Loading branch information
JakeStanger committed Apr 1, 2024
1 parent b9b29a4 commit 3ba8b4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/config/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub struct CommonConfig {
pub on_mouse_exit: Option<ScriptInput>,

pub tooltip: Option<String>,
#[serde(default)]
pub disable_popup: bool,
}

Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ macro_rules! module_impl {
}

fn take_common(&mut self) -> $crate::config::CommonConfig {
self.common.take().expect("common config to exist")
self.common.take().unwrap_or_default()
}
};
}
Expand Down

0 comments on commit 3ba8b4b

Please sign in to comment.