mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Revert originalContent check for undefined
This commit is contained in:
parent
a5435a662e
commit
b2297846d9
1 changed files with 1 additions and 5 deletions
|
|
@ -442,12 +442,8 @@ export class ClaudeDev {
|
|||
.then(() => true)
|
||||
.catch(() => false)
|
||||
|
||||
let originalContent: string | undefined
|
||||
if (fileExists) {
|
||||
originalContent = await fs.readFile(absolutePath, "utf-8")
|
||||
}
|
||||
|
||||
if (fileExists && originalContent && originalContent.length > 0) {
|
||||
const originalContent = await fs.readFile(absolutePath, "utf-8")
|
||||
// fix issue where claude always removes newline from the file
|
||||
if (originalContent.endsWith("\n") && !newContent.endsWith("\n")) {
|
||||
newContent += "\n"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue