chore: handle null parameters on `ignore_branch`
parent
0a9eebf5cc
commit
a9138468f9
|
|
@ -80,12 +80,12 @@ local function ignore_dir(dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Is the current branch ignored for auto-saving and loading?
|
---Is the current branch ignored for auto-saving and loading?
|
||||||
---@param dir string Branch to be used for the session
|
---@param branch? string Branch to be used for the session
|
||||||
---@return boolean
|
---@return boolean
|
||||||
local function ignore_branch(branch)
|
local function ignore_branch(branch)
|
||||||
local ignored_branches = config.options.ignored_branches
|
local ignored_branches = config.options.ignored_branches
|
||||||
|
|
||||||
if ignored_branches == nil then
|
if not branch or ignored_branches == nil then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue