fix: handle empty content correctly in FilesStore saveFile() (#1381)

* Fix FilesStore: Handle empty content correctly in saveFile(). Happens when user creates files in the web terminal

* updated logic

---------

Co-authored-by: Anirban Kar <thecodacus@gmail.com>
This commit is contained in:
bizrockman 2025-02-28 22:04:39 +01:00 committed by GitHub
parent b7c8677cb8
commit 8deee04a63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,7 +115,7 @@ export class FilesStore {
const oldContent = this.getFile(filePath)?.content;
if (!oldContent) {
if (!oldContent && oldContent !== '') {
unreachable('Expected content to be defined');
}