keymap_ui: Don't try to parse empty action arguments as JSON (#36278)
Closes #ISSUE Release Notes: - Keymap Editor: Fixed an issue where leaving the arguments field empty would result in an error even if arguments were optional
This commit is contained in:
parent
3d77ad7e1a
commit
f642f7615f
1 changed files with 1 additions and 0 deletions
|
@ -2181,6 +2181,7 @@ impl KeybindingEditorModal {
|
||||||
|
|
||||||
let value = action_arguments
|
let value = action_arguments
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
.filter(|args| !args.is_empty())
|
||||||
.map(|args| {
|
.map(|args| {
|
||||||
serde_json::from_str(args).context("Failed to parse action arguments as JSON")
|
serde_json::from_str(args).context("Failed to parse action arguments as JSON")
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue