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:
@@ -115,7 +115,7 @@ export class FilesStore {
|
||||
|
||||
const oldContent = this.getFile(filePath)?.content;
|
||||
|
||||
if (!oldContent) {
|
||||
if (!oldContent && oldContent !== '') {
|
||||
unreachable('Expected content to be defined');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user