mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Revert originalContent check for undefined
This commit is contained in:
@@ -442,12 +442,8 @@ export class ClaudeDev {
|
|||||||
.then(() => true)
|
.then(() => true)
|
||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
|
|
||||||
let originalContent: string | undefined
|
|
||||||
if (fileExists) {
|
if (fileExists) {
|
||||||
originalContent = await fs.readFile(absolutePath, "utf-8")
|
const originalContent = await fs.readFile(absolutePath, "utf-8")
|
||||||
}
|
|
||||||
|
|
||||||
if (fileExists && originalContent && originalContent.length > 0) {
|
|
||||||
// fix issue where claude always removes newline from the file
|
// fix issue where claude always removes newline from the file
|
||||||
if (originalContent.endsWith("\n") && !newContent.endsWith("\n")) {
|
if (originalContent.endsWith("\n") && !newContent.endsWith("\n")) {
|
||||||
newContent += "\n"
|
newContent += "\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user