Skip to content

Commit

Permalink
fix(apply_shim): add nil check for opts
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoP committed Nov 4, 2024
1 parent c334ac7 commit 0dc442c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/dressing/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ local M = vim.deepcopy(default_config)

-- Apply shims for backwards compatibility
---@param key string
---@param opts table
---@return table
---@param opts? table
---@return table?
M.apply_shim = function(key, opts)
-- Support start_in_insert for backwards compatibility.
if key == "input" and opts.start_in_insert ~= nil then
if key == "input" and opts ~= nil and opts.start_in_insert ~= nil then
opts.start_mode = opts.start_in_insert and "insert" or "normal"
end

Expand Down

0 comments on commit 0dc442c

Please sign in to comment.