Skip to content

Commit

Permalink
Fix indexing nil 'config'
Browse files Browse the repository at this point in the history
  • Loading branch information
fjchen7 authored and deathbeam committed Sep 17, 2024
1 parent b70d043 commit 0c9d886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/CopilotChat/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ end
---@param config CopilotChat.config
local function append(str, config)
state.chat:append(str)
if config.auto_follow_cursor then
if config and config.auto_follow_cursor then
state.chat:follow()
end
end
Expand Down

0 comments on commit 0c9d886

Please sign in to comment.