Skip to content

Commit f1939e8

Browse files
authored
fix(async): prevent nil value error (#523)
1 parent 6229225 commit f1939e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/plenary/async/async.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ local f = require "plenary.functional"
77
local M = {}
88

99
local function is_callable(fn)
10-
return type(fn) == "function" or type(getmetatable(fn)["__call"]) == "function"
10+
return type(fn) == "function" or (type(fn) == "table" and type(getmetatable(fn)["__call"]) == "function")
1111
end
1212

1313
---because we can't store varargs

0 commit comments

Comments
 (0)