Skip to content

Commit d33f094

Browse files
committed
fix: use "" in replace_all if nil
1 parent 42a83b0 commit d33f094

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/luasnip-snippets/utils/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ local M = {}
55
---@param template string
66
---@return string[]
77
function M.replace_all(match, template)
8+
match = vim.F.if_nil(match, "")
89
---@type string
910
local match_str = ""
1011
if type(match) == "table" then

0 commit comments

Comments
 (0)