* fix: never attempt to concatenate nil values, use empty strings (#2692) * [pre-commit.ci lite] apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
@@ -59,6 +59,10 @@ function M.func(input, opts)
|
||||
local replace_in_file = require("avante.llm_tools.replace_in_file")
|
||||
local Utils = require("avante.utils")
|
||||
|
||||
if input.new_str == nil then input.new_str = "" end
|
||||
|
||||
if input.old_str == nil then input.old_str = "" end
|
||||
|
||||
-- Remove trailing spaces from the new string
|
||||
input.new_str = Utils.remove_trailing_spaces(input.new_str)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user