Skip to content

Commit 6df9314

Browse files
authored
fix: handle empty :Org arguments. (#952)
1 parent e9f2407 commit 6df9314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/org/global.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ end
122122

123123
vim.api.nvim_create_user_command('Org', function(opts)
124124
local item = resolve_item(opts.fargs)
125-
if item and (type(item) == 'function' or getmetatable(item).__call) then
125+
if item and (type(item) == 'function' or (getmetatable(item) and getmetatable(item).__call)) then
126126
return item()
127127
end
128128
require('orgmode.utils').echo_error(('Invalid command "Org %s"'):format(opts.args))

0 commit comments

Comments
 (0)