mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Fix errors when saving a blank hotkey
Saving a blank hotkey showed false error even though hotkey was saved. This solution solves the issue as it stands, but I would recommend looking into cleaning up the error handling surrounding this functionality before adding any new hotkey fields.
This commit is contained in:
committed by
jacobherrington
parent
2ccd00a378
commit
e173117a44
@@ -28,6 +28,12 @@ class HotkeyTab extends React.Component {
|
||||
}})
|
||||
}
|
||||
this.handleSettingError = (err) => {
|
||||
if (
|
||||
this.state.config.hotkey.toggleMain == "" ||
|
||||
this.state.config.hotkey.toggleMode == ""
|
||||
) {
|
||||
return
|
||||
}
|
||||
this.setState({keymapAlert: {
|
||||
type: 'error',
|
||||
message: err.message != null ? err.message : i18n.__('An error occurred!')
|
||||
|
||||
Reference in New Issue
Block a user