mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 13:41:00 +00:00
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:
parent
b7c8677cb8
commit
8deee04a63
@ -115,7 +115,7 @@ export class FilesStore {
|
||||
|
||||
const oldContent = this.getFile(filePath)?.content;
|
||||
|
||||
if (!oldContent) {
|
||||
if (!oldContent && oldContent !== '') {
|
||||
unreachable('Expected content to be defined');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user