From 0dc442c847727425bd190ab7b33a03500964e981 Mon Sep 17 00:00:00 2001 From: TheLeoP Date: Mon, 4 Nov 2024 16:23:00 -0500 Subject: [PATCH] fix(apply_shim): add nil check for opts --- lua/dressing/config.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/dressing/config.lua b/lua/dressing/config.lua index 1819b22..2b6f685 100644 --- a/lua/dressing/config.lua +++ b/lua/dressing/config.lua @@ -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