Просмотр исходного кода

fix: restore content undefined check in WriteToFileTool.handlePartial() (#9614)

Daniel 2 месяцев назад
Родитель
Сommit
a8a44510d5
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/core/tools/WriteToFileTool.ts

+ 1 - 1
src/core/tools/WriteToFileTool.ts

@@ -291,7 +291,7 @@ export class WriteToFileTool extends BaseTool<"write_to_file"> {
 		const relPath: string | undefined = block.params.path
 		const relPath: string | undefined = block.params.path
 		let newContent: string | undefined = block.params.content
 		let newContent: string | undefined = block.params.content
 
 
-		if (!relPath) {
+		if (!relPath || newContent === undefined) {
 			return
 			return
 		}
 		}