From de21ad9874671a6e44665bad1ad8b2d4f8b0c134 Mon Sep 17 00:00:00 2001 From: DoloresHA Date: Fri, 28 Mar 2025 13:15:49 -0400 Subject: [PATCH] fix: handle empty :Org arguments. --- lua/orgmode/org/global.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/orgmode/org/global.lua b/lua/orgmode/org/global.lua index 3c029f083..5e050c4dc 100644 --- a/lua/orgmode/org/global.lua +++ b/lua/orgmode/org/global.lua @@ -122,7 +122,7 @@ end vim.api.nvim_create_user_command('Org', function(opts) local item = resolve_item(opts.fargs) - if item and (type(item) == 'function' or getmetatable(item).__call) then + if item and (type(item) == 'function' or (getmetatable(item) and getmetatable(item).__call)) then return item() end require('orgmode.utils').echo_error(('Invalid command "Org %s"'):format(opts.args))