Skip to content

Commit

Permalink
fix: add nil check in backwards compatibility shim (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoP authored Nov 4, 2024
1 parent c334ac7 commit 6ef1ca4
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 6ef1ca4

Please sign in to comment.