Skip to content

Commit

Permalink
fix(core.keybinds): type errors with events
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jan 6, 2024
1 parent bcbf645 commit dbe2841
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/neorg/modules/core/keybinds/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ module.public = {

-- Broadcast our event with the desired payload!
modules.broadcast_event(
modules.create_event(module, "core.keybinds.events.enable_keybinds", payload),
assert(modules.create_event(module, "core.keybinds.events.enable_keybinds", payload)),
function()
for neorg_mode, neovim_modes in pairs(bound_keys) do
if neorg_mode == "all" or neorg_mode == current_mode then
Expand Down Expand Up @@ -460,12 +460,12 @@ module.on_event = function(event)
-- If it is defined then broadcast the event
if module.events.defined[keybind_event_path] then
modules.broadcast_event(
modules.create_event(
assert(modules.create_event(
module,
"core.keybinds.events." .. keybind_event_path,
vim.list_slice(event.content, 3)
)
)
))
else -- Otherwise throw an error
log.error("Unable to trigger keybind", keybind_event_path, "- the keybind does not exist")
end
Expand Down

0 comments on commit dbe2841

Please sign in to comment.